Skip to content

Commit e04a6e0

Browse files
author
George Karpenkov
committed
Disable TSan support under 32bit.
Refactor slightly the relevant LIT code.
1 parent 80911b5 commit e04a6e0

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

test/lit.cfg

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -908,17 +908,24 @@ def source_compiler_rt_libs(path):
908908
source_compiler_rt_libs(os.path.join(test_resource_dir, 'clang', 'lib',
909909
platform.system().lower()))
910910

911-
def check_runtime_feature(name):
911+
def check_runtime_libs(features_to_check):
912912
for lib in config.compiler_rt_libs:
913-
if lib.startswith('libclang_rt.' + name + '_'):
914-
config.available_features.add(name + '_runtime')
915-
return
916-
917-
check_runtime_feature('profile')
918-
check_runtime_feature('asan')
919-
check_runtime_feature('ubsan')
920-
check_runtime_feature('tsan')
921-
check_runtime_feature('safestack')
913+
for (libname, feature) in features_to_check:
914+
if lib.startswith("libclang_rt." + libname + "_"):
915+
config.available_features.add(feature)
916+
917+
runtime_libs = [
918+
('profile', 'profile_runtime'),
919+
('asan', 'asan_runtime'),
920+
('ubsan', 'ubsan_runtime'),
921+
('tsan', 'tsan_runtime'),
922+
('safestack', 'safestack_runtime')
923+
]
924+
925+
if run_ptrsize != "32":
926+
runtime_libs.append(('tsan', 'tsan_runtime'))
927+
928+
check_runtime_libs(libs_to_check)
922929

923930
if not getattr(config, 'target_run_simple_swift', None):
924931
config.target_run_simple_swift = (

0 commit comments

Comments
 (0)