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