@@ -940,9 +940,9 @@ class libcompiler_rt(MTLibrary, SjLjLibrary):
940940 # restriction soon: https://reviews.llvm.org/D71738
941941 force_object_files = True
942942
943- cflags = ['-fno-builtin' , '-DNDEBUG' ]
943+ cflags = ['-fno-builtin' , '-DNDEBUG' , '-DCOMPILER_RT_HAS_UNAME=1' ]
944944 src_dir = 'system/lib/compiler-rt/lib/builtins'
945- includes = ['system/lib/libc' ]
945+ includes = ['system/lib/libc' , 'system/lib/compiler-rt/include' ]
946946 excludes = [
947947 # gcc_personality_v0.c depends on libunwind, which don't include by default.
948948 'gcc_personality_v0.c' ,
@@ -970,6 +970,8 @@ class libcompiler_rt(MTLibrary, SjLjLibrary):
970970 'trunctfxf2.c' ,
971971 ]
972972 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' )
973975 src_files += files_in_path (
974976 path = 'system/lib/compiler-rt' ,
975977 filenames = [
@@ -2082,15 +2084,6 @@ class CompilerRTLibrary(Library):
20822084 # restriction soon: https://reviews.llvm.org/D71738
20832085 force_object_files = True
20842086
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-
20942087class libubsan_minimal_rt (CompilerRTLibrary , MTLibrary ):
20952088 name = 'libubsan_minimal_rt'
20962089 never_force = True
@@ -2365,7 +2358,6 @@ def add_sanitizer_libs():
23652358
23662359 if only_forced :
23672360 add_library ('libcompiler_rt' )
2368- add_library ('libcompiler_rt_profile' )
23692361 add_sanitizer_libs ()
23702362 add_forced_libs ()
23712363 return libs_to_link
@@ -2403,7 +2395,6 @@ def add_sanitizer_libs():
24032395 elif settings .MALLOC != 'none' :
24042396 add_library ('libmalloc' )
24052397 add_library ('libcompiler_rt' )
2406- add_library ('libcompiler_rt_profile' )
24072398 if settings .LINK_AS_CXX :
24082399 add_library ('libc++' )
24092400 if settings .LINK_AS_CXX or sanitize :
0 commit comments