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):
127
127
128
128
129
129
if is_configured ("llvm_use_sanitizer" ):
130
+ config .environment ["MallocNanoZone" ] = "0"
130
131
if "Address" in config .llvm_use_sanitizer :
131
132
config .environment ["ASAN_OPTIONS" ] = "detect_stack_use_after_return=1"
132
133
if "Darwin" in config .host_os :
133
134
config .environment ["DYLD_INSERT_LIBRARIES" ] = find_sanitizer_runtime (
134
135
"libclang_rt.asan_osx_dynamic.dylib"
135
136
)
136
- config .environment ["MallocNanoZone" ] = "0"
137
137
138
138
if "Thread" in config .llvm_use_sanitizer :
139
139
config .environment ["TSAN_OPTIONS" ] = "halt_on_error=1"
Original file line number Diff line number Diff line change 50
50
)
51
51
52
52
# Enable sanitizer runtime flags.
53
- if "Address" in config .llvm_use_sanitizer :
53
+ if config .llvm_use_sanitizer :
54
54
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 :
59
55
config .environment ["TSAN_OPTIONS" ] = "halt_on_error=1"
60
-
56
+ config . environment [ "MallocNanoZone" ] = "0"
61
57
62
58
if config .lldb_platform_url and config .cmake_sysroot and config .enable_remote :
63
59
if re .match (r".*-linux.*" , config .target_triple ):
Original file line number Diff line number Diff line change 35
35
llvm_config .with_environment ("PATH" , os .path .dirname (sys .executable ), append_path = True )
36
36
37
37
# 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"
40
42
41
43
# testFormat: The test format to use to interpret tests.
42
44
config .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@"
9
9
config.lldb_obj_root = "@LLDB_BINARY_DIR@"
10
10
config.lldb_src_root = "@LLDB_SOURCE_DIR@"
11
11
config.target_triple = "@LLVM_TARGET_TRIPLE@"
12
+ config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
12
13
config.python_executable = "@Python3_EXECUTABLE@"
13
14
14
15
import lit.llvm
You can’t perform that action at this time.
0 commit comments