File tree Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -127,13 +127,13 @@ def delete_module_cache(path):
127127
128128
129129if is_configured ("llvm_use_sanitizer" ):
130+ config .environment ["MallocNanoZone" ] = "0"
130131 if "Address" in config .llvm_use_sanitizer :
131132 config .environment ["ASAN_OPTIONS" ] = "detect_stack_use_after_return=1"
132133 if "Darwin" in config .host_os :
133134 config .environment ["DYLD_INSERT_LIBRARIES" ] = find_sanitizer_runtime (
134135 "libclang_rt.asan_osx_dynamic.dylib"
135136 )
136- config .environment ["MallocNanoZone" ] = "0"
137137
138138 if "Thread" in config .llvm_use_sanitizer :
139139 config .environment ["TSAN_OPTIONS" ] = "halt_on_error=1"
Original file line number Diff line number Diff line change 5050)
5151
5252# Enable sanitizer runtime flags.
53- if "Address" in config .llvm_use_sanitizer :
53+ if config .llvm_use_sanitizer :
5454 config .environment ["ASAN_OPTIONS" ] = "detect_stack_use_after_return=1"
55- if platform .system () == "Darwin" :
56- config .environment ["MallocNanoZone" ] = "0"
57-
58- if "Thread" in config .llvm_use_sanitizer :
5955 config .environment ["TSAN_OPTIONS" ] = "halt_on_error=1"
60-
56+ config . environment [ "MallocNanoZone" ] = "0"
6157
6258if config .lldb_platform_url and config .cmake_sysroot and config .enable_remote :
6359 if re .match (r".*-linux.*" , config .target_triple ):
Original file line number Diff line number Diff line change 3535llvm_config .with_environment ("PATH" , os .path .dirname (sys .executable ), append_path = True )
3636
3737# Enable sanitizer runtime flags.
38- config .environment ["ASAN_OPTIONS" ] = "detect_stack_use_after_return=1"
39- config .environment ["TSAN_OPTIONS" ] = "halt_on_error=1"
38+ if config .llvm_use_sanitizer :
39+ config .environment ["ASAN_OPTIONS" ] = "detect_stack_use_after_return=1"
40+ config .environment ["TSAN_OPTIONS" ] = "halt_on_error=1"
41+ config .environment ["MallocNanoZone" ] = "0"
4042
4143# testFormat: The test format to use to interpret tests.
4244config .test_format = lit .formats .GoogleTest (config .llvm_build_mode , "Tests" )
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
99config.lldb_obj_root = "@LLDB_BINARY_DIR@"
1010config.lldb_src_root = "@LLDB_SOURCE_DIR@"
1111config.target_triple = "@LLVM_TARGET_TRIPLE@"
12+ config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
1213config.python_executable = "@Python3_EXECUTABLE@"
1314
1415import lit.llvm
You can’t perform that action at this time.
0 commit comments