@@ -170,7 +170,10 @@ 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:: Bool = false ,
175+ lock_microarchitecture:: Bool = true ,
176+ )
174177 write (io, """
175178 #!/bin/bash
176179 # This compiler wrapper script brought into existence by `generate_compiler_wrappers!()`
@@ -226,7 +229,7 @@ function wrapper(io::IO,
226229
227230 # If we're given both -fsanitize= and -Wl,--no-undefined, then try turning
228231 # the latter into a warning rather than an error.
229- if sanitize (platform) != nothing
232+ if sanitize
230233 println (io, """
231234 if [[ " \$ {ARGS[@]} " == *"-Wl,--no-undefined"* ]]; then
232235 PRE_FLAGS+=("-Wl,--warn-unresolved-symbols")
@@ -642,6 +645,8 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
642645 no_soft_float= arch (p) in (" armv6l" , " armv7l" ),
643646 # Override `LD_LIBRARY_PATH` to avoid external settings mess it up.
644647 env= Dict (" LD_LIBRARY_PATH" => ld_library_path (platform, host_platform; csl_paths= false )),
648+ sanitize= ! isnothing (sanitize (p)),
649+ lock_microarchitecture,
645650 )
646651 end
647652
@@ -655,6 +660,8 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
655660 no_soft_float= arch (p) in (" armv6l" , " armv7l" ),
656661 # Override `LD_LIBRARY_PATH` to avoid external settings mess it up.
657662 env= Dict (" LD_LIBRARY_PATH" => ld_library_path (platform, host_platform; csl_paths= false )),
663+ sanitize= ! isnothing (sanitize (p)),
664+ lock_microarchitecture,
658665 )
659666 end
660667
0 commit comments