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