@@ -170,7 +170,9 @@ function wrapper(io::IO,
170
170
hash_args:: Bool = false ,
171
171
extra_cmds:: String = " " ,
172
172
env:: Dict{String,String} = Dict {String,String} (),
173
- unsafe_flags = String[])
173
+ unsafe_flags = String[],
174
+ sanitize= false ,
175
+ )
174
176
write (io, """
175
177
#!/bin/bash
176
178
# This compiler wrapper script brought into existence by `generate_compiler_wrappers!()`
@@ -226,7 +228,7 @@ function wrapper(io::IO,
226
228
227
229
# If we're given both -fsanitize= and -Wl,--no-undefined, then try turning
228
230
# the latter into a warning rather than an error.
229
- if sanitize (platform) != nothing
231
+ if sanitize
230
232
println (io, """
231
233
if [[ " \$ {ARGS[@]} " == *"-Wl,--no-undefined"* ]]; then
232
234
PRE_FLAGS+=("-Wl,--warn-unresolved-symbols")
@@ -642,6 +644,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
642
644
no_soft_float= arch (p) in (" armv6l" , " armv7l" ),
643
645
# Override `LD_LIBRARY_PATH` to avoid external settings mess it up.
644
646
env= Dict (" LD_LIBRARY_PATH" => ld_library_path (platform, host_platform; csl_paths= false )),
647
+ sanitize= sanitize (p),
645
648
)
646
649
end
647
650
@@ -655,6 +658,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
655
658
no_soft_float= arch (p) in (" armv6l" , " armv7l" ),
656
659
# Override `LD_LIBRARY_PATH` to avoid external settings mess it up.
657
660
env= Dict (" LD_LIBRARY_PATH" => ld_library_path (platform, host_platform; csl_paths= false )),
661
+ sanitize= sanitize (p),
658
662
)
659
663
end
660
664
0 commit comments