From 0ada5fdd4c24b57581e4da7ccd3fd6857cef7362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Sun, 9 Feb 2025 02:35:24 +0000 Subject: [PATCH] [Runner] Pass new argument to `wrapper` which was previously taken from outer scope. Sigh --- src/Runner.jl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Runner.jl b/src/Runner.jl index a219bdc1..ecedd554 100644 --- a/src/Runner.jl +++ b/src/Runner.jl @@ -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!()` @@ -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") @@ -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 @@ -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