@@ -940,9 +940,9 @@ class libcompiler_rt(MTLibrary, SjLjLibrary):
940
940
# restriction soon: https://reviews.llvm.org/D71738
941
941
force_object_files = True
942
942
943
- cflags = ['-fno-builtin' , '-DNDEBUG' ]
943
+ cflags = ['-fno-builtin' , '-DNDEBUG' , '-DCOMPILER_RT_HAS_UNAME=1' ]
944
944
src_dir = 'system/lib/compiler-rt/lib/builtins'
945
- includes = ['system/lib/libc' ]
945
+ includes = ['system/lib/libc' , 'system/lib/compiler-rt/include' ]
946
946
excludes = [
947
947
# gcc_personality_v0.c depends on libunwind, which don't include by default.
948
948
'gcc_personality_v0.c' ,
@@ -970,6 +970,8 @@ class libcompiler_rt(MTLibrary, SjLjLibrary):
970
970
'trunctfxf2.c' ,
971
971
]
972
972
src_files = glob_in_path (src_dir , '*.c' , excludes = excludes )
973
+ src_files += glob_in_path ('system/lib/compiler-rt/lib/profile' , '*.c' )
974
+ src_files += glob_in_path ('system/lib/compiler-rt/lib/profile' , '*.cpp' )
973
975
src_files += files_in_path (
974
976
path = 'system/lib/compiler-rt' ,
975
977
filenames = [
@@ -2082,15 +2084,6 @@ class CompilerRTLibrary(Library):
2082
2084
# restriction soon: https://reviews.llvm.org/D71738
2083
2085
force_object_files = True
2084
2086
2085
- class libcompiler_rt_profile (Library ):
2086
- name = 'libcompiler_rt_profile'
2087
-
2088
- cflags = ['-fno-builtin' , '-DCOMPILER_RT_HAS_UNAME=1' ]
2089
- includes = ['system/lib/libc' , 'system/lib/compiler-rt/include' ]
2090
- src_dir = 'system/lib/compiler-rt/lib/profile'
2091
- src_files = glob_in_path (src_dir , '*.c' )
2092
- src_files += glob_in_path (src_dir , '*.cpp' )
2093
-
2094
2087
class libubsan_minimal_rt (CompilerRTLibrary , MTLibrary ):
2095
2088
name = 'libubsan_minimal_rt'
2096
2089
never_force = True
@@ -2365,7 +2358,6 @@ def add_sanitizer_libs():
2365
2358
2366
2359
if only_forced :
2367
2360
add_library ('libcompiler_rt' )
2368
- add_library ('libcompiler_rt_profile' )
2369
2361
add_sanitizer_libs ()
2370
2362
add_forced_libs ()
2371
2363
return libs_to_link
@@ -2403,7 +2395,6 @@ def add_sanitizer_libs():
2403
2395
elif settings .MALLOC != 'none' :
2404
2396
add_library ('libmalloc' )
2405
2397
add_library ('libcompiler_rt' )
2406
- add_library ('libcompiler_rt_profile' )
2407
2398
if settings .LINK_AS_CXX :
2408
2399
add_library ('libc++' )
2409
2400
if settings .LINK_AS_CXX or sanitize :
0 commit comments