Skip to content

Commit ce9a6ca

Browse files
committed
[Runner] Pass new argument to wrapper which was previously taken from outer scope. Sigh
1 parent 56fda2b commit ce9a6ca

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Runner.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ function wrapper(io::IO,
170170
hash_args::Bool = false,
171171
extra_cmds::String = "",
172172
env::Dict{String,String} = Dict{String,String}(),
173-
unsafe_flags = String[])
173+
unsafe_flags = String[],
174+
sanitize=false,
175+
)
174176
write(io, """
175177
#!/bin/bash
176178
# This compiler wrapper script brought into existence by `generate_compiler_wrappers!()`
@@ -226,7 +228,7 @@ function wrapper(io::IO,
226228

227229
# If we're given both -fsanitize= and -Wl,--no-undefined, then try turning
228230
# the latter into a warning rather than an error.
229-
if sanitize(platform) != nothing
231+
if sanitize
230232
println(io, """
231233
if [[ " \${ARGS[@]} " == *"-Wl,--no-undefined"* ]]; then
232234
PRE_FLAGS+=("-Wl,--warn-unresolved-symbols")
@@ -642,6 +644,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
642644
no_soft_float=arch(p) in ("armv6l", "armv7l"),
643645
# Override `LD_LIBRARY_PATH` to avoid external settings mess it up.
644646
env=Dict("LD_LIBRARY_PATH"=>ld_library_path(platform, host_platform; csl_paths=false)),
647+
sanitize=sanitize(p),
645648
)
646649
end
647650

@@ -655,6 +658,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
655658
no_soft_float=arch(p) in ("armv6l", "armv7l"),
656659
# Override `LD_LIBRARY_PATH` to avoid external settings mess it up.
657660
env=Dict("LD_LIBRARY_PATH"=>ld_library_path(platform, host_platform; csl_paths=false)),
661+
sanitize=sanitize(p),
658662
)
659663
end
660664

0 commit comments

Comments
 (0)