forked from OSchip/llvm-project
Unify the name of compiler-rt builtins library on Linux.
Call it "libclang_rt.builtins-<arch>.a" to be consistent with sanitizers/profile libraries naming. Modify Makefile and CMake build systems and Clang driver accordingly. Fixes PR19822. llvm-svn: 209473
This commit is contained in:
parent
df3520581a
commit
00997e29e5
|
@ -247,10 +247,10 @@ add_custom_target(builtins)
|
|||
if (NOT WIN32)
|
||||
foreach(arch x86_64 i386 arm)
|
||||
if(CAN_TARGET_${arch})
|
||||
add_compiler_rt_runtime(clang_rt.${arch} ${arch} STATIC
|
||||
add_compiler_rt_runtime(clang_rt.builtins-${arch} ${arch} STATIC
|
||||
SOURCES ${${arch}_SOURCES}
|
||||
CFLAGS "-std=c99")
|
||||
add_dependencies(builtins clang_rt.${arch})
|
||||
add_dependencies(builtins clang_rt.builtins-${arch})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
|
|
@ -49,9 +49,9 @@ endif
|
|||
|
||||
# Build runtime libraries for i386.
|
||||
ifeq ($(call contains,$(SupportedArches),i386),true)
|
||||
Configs += full-i386 profile-i386 san-i386 asan-i386 asan_cxx-i386 \
|
||||
Configs += builtins-i386 profile-i386 san-i386 asan-i386 asan_cxx-i386 \
|
||||
ubsan-i386 ubsan_cxx-i386
|
||||
Arch.full-i386 := i386
|
||||
Arch.builtins-i386 := i386
|
||||
Arch.profile-i386 := i386
|
||||
Arch.san-i386 := i386
|
||||
Arch.asan-i386 := i386
|
||||
|
@ -62,10 +62,10 @@ endif
|
|||
|
||||
# Build runtime libraries for x86_64.
|
||||
ifeq ($(call contains,$(SupportedArches),x86_64),true)
|
||||
Configs += full-x86_64 profile-x86_64 san-x86_64 asan-x86_64 asan_cxx-x86_64 \
|
||||
Configs += builtins-x86_64 profile-x86_64 san-x86_64 asan-x86_64 asan_cxx-x86_64 \
|
||||
tsan-x86_64 msan-x86_64 ubsan-x86_64 ubsan_cxx-x86_64 dfsan-x86_64 \
|
||||
lsan-x86_64
|
||||
Arch.full-x86_64 := x86_64
|
||||
Arch.builtins-x86_64 := x86_64
|
||||
Arch.profile-x86_64 := x86_64
|
||||
Arch.san-x86_64 := x86_64
|
||||
Arch.asan-x86_64 := x86_64
|
||||
|
@ -92,8 +92,8 @@ endif
|
|||
CFLAGS := -Wall -Werror -O3 -fomit-frame-pointer
|
||||
SANITIZER_CFLAGS := -fPIE -fno-builtin -gline-tables-only
|
||||
|
||||
CFLAGS.full-i386 := $(CFLAGS) -m32
|
||||
CFLAGS.full-x86_64 := $(CFLAGS) -m64
|
||||
CFLAGS.builtins-i386 := $(CFLAGS) -m32
|
||||
CFLAGS.builtins-x86_64 := $(CFLAGS) -m64
|
||||
CFLAGS.profile-i386 := $(CFLAGS) -m32
|
||||
CFLAGS.profile-x86_64 := $(CFLAGS) -m64
|
||||
CFLAGS.san-i386 := $(CFLAGS) -m32 $(SANITIZER_CFLAGS) -fno-rtti
|
||||
|
@ -124,11 +124,11 @@ LDFLAGS.asan-arm-android := $(LDFLAGS) $(ANDROID_COMMON_FLAGS) -ldl -lm -llog \
|
|||
# Use our stub SDK as the sysroot to support more portable building. For now we
|
||||
# just do this for the core module, because the stub SDK doesn't have
|
||||
# enough support to build the sanitizers or profile runtimes.
|
||||
CFLAGS.full-i386 += --sysroot=$(ProjSrcRoot)/SDKs/linux
|
||||
CFLAGS.full-x86_64 += --sysroot=$(ProjSrcRoot)/SDKs/linux
|
||||
CFLAGS.builtins-i386 += --sysroot=$(ProjSrcRoot)/SDKs/linux
|
||||
CFLAGS.builtins-x86_64 += --sysroot=$(ProjSrcRoot)/SDKs/linux
|
||||
|
||||
FUNCTIONS.full-i386 := $(CommonFunctions) $(ArchFunctions.i386)
|
||||
FUNCTIONS.full-x86_64 := $(CommonFunctions) $(ArchFunctions.x86_64)
|
||||
FUNCTIONS.builtins-i386 := $(CommonFunctions) $(ArchFunctions.i386)
|
||||
FUNCTIONS.builtins-x86_64 := $(CommonFunctions) $(ArchFunctions.x86_64)
|
||||
FUNCTIONS.profile-i386 := GCDAProfiling
|
||||
FUNCTIONS.profile-x86_64 := GCDAProfiling
|
||||
FUNCTIONS.san-i386 := $(SanitizerCommonFunctions)
|
||||
|
|
Loading…
Reference in New Issue