Skip to content

Commit

Permalink
[Runner] Pass new argument to wrapper which was previously taken fr…
Browse files Browse the repository at this point in the history
…om outer scope. Sigh
  • Loading branch information
giordano committed Feb 9, 2025
1 parent 56fda2b commit 0ada5fd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Runner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ function wrapper(io::IO,
hash_args::Bool = false,
extra_cmds::String = "",
env::Dict{String,String} = Dict{String,String}(),
unsafe_flags = String[])
unsafe_flags = String[],
sanitize=false,
)
write(io, """
#!/bin/bash
# This compiler wrapper script brought into existence by `generate_compiler_wrappers!()`
Expand Down Expand Up @@ -226,7 +228,7 @@ function wrapper(io::IO,

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

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

Expand Down

0 comments on commit 0ada5fd

Please sign in to comment.