Skip to content

Commit e1692b4

Browse files
authored
[compiler-rt] Build with -DCOMPILER_RT_HAS_ATOMICS (#24580)
It looks like without this the fallback functions are not actually thread safe: https://github.com/llvm/llvm-project/blob/63b80dd01dafc92104ee43e4f0f5296d644c25ec/compiler-rt/lib/profile/InstrProfilingUtil.c#L102-L119 Followup to #24160
1 parent 645f5b1 commit e1692b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/system_libs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ class libcompiler_rt(MTLibrary, SjLjLibrary):
939939
# restriction soon: https://reviews.llvm.org/D71738
940940
force_object_files = True
941941

942-
cflags = ['-fno-builtin', '-DNDEBUG', '-DCOMPILER_RT_HAS_UNAME=1']
942+
cflags = ['-fno-builtin', '-DNDEBUG', '-DCOMPILER_RT_HAS_UNAME=1', '-DCOMPILER_RT_HAS_ATOMICS=1']
943943
src_dir = 'system/lib/compiler-rt/lib/builtins'
944944
profile_src_dir = 'system/lib/compiler-rt/lib/profile'
945945
includes = ['system/lib/libc', 'system/lib/compiler-rt/include']

0 commit comments

Comments
 (0)