forked from OSchip/llvm-project
Revert "[ASan] Moved optimized callbacks into a separate library."
This reverts commit ab3640aa0e
.
Reviewed By: kstoimenov
Differential Revision: https://reviews.llvm.org/D116223
This commit is contained in:
parent
d45a247998
commit
4bf31659fa
|
@ -826,11 +826,6 @@ collectSanitizerRuntimes(const ToolChain &TC, const ArgList &Args,
|
||||||
if (SanArgs.needsStatsRt() && SanArgs.linkRuntimes())
|
if (SanArgs.needsStatsRt() && SanArgs.linkRuntimes())
|
||||||
StaticRuntimes.push_back("stats_client");
|
StaticRuntimes.push_back("stats_client");
|
||||||
|
|
||||||
// Always link the static runtime regardless of DSO or executable.
|
|
||||||
if (SanArgs.needsAsanRt()) {
|
|
||||||
HelperStaticRuntimes.push_back("asan_static");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Collect static runtimes.
|
// Collect static runtimes.
|
||||||
if (Args.hasArg(options::OPT_shared)) {
|
if (Args.hasArg(options::OPT_shared)) {
|
||||||
// Don't link static runtimes into DSOs.
|
// Don't link static runtimes into DSOs.
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
||||||
// RUN: | FileCheck --check-prefix=CHECK-ASAN-NO-LINK-RUNTIME-LINUX %s
|
// RUN: | FileCheck --check-prefix=CHECK-ASAN-NO-LINK-RUNTIME-LINUX %s
|
||||||
//
|
//
|
||||||
// CHECK-ASAN-NO-LINK-RUNTIME-LINUX-NOT: libclang_rt.asan-x86_64
|
// CHECK-ASAN-NO-LINK-RUNTIME-LINUX-NOT: libclang_rt.asan
|
||||||
|
|
||||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||||
// RUN: -target i386-unknown-linux -fuse-ld=ld -fsanitize=address -shared-libsan \
|
// RUN: -target i386-unknown-linux -fuse-ld=ld -fsanitize=address -shared-libsan \
|
||||||
|
|
|
@ -34,6 +34,7 @@ set(ASAN_SOURCES
|
||||||
|
|
||||||
if (NOT WIN32 AND NOT APPLE)
|
if (NOT WIN32 AND NOT APPLE)
|
||||||
list(APPEND ASAN_SOURCES
|
list(APPEND ASAN_SOURCES
|
||||||
|
asan_rtl_x86_64.S
|
||||||
asan_interceptors_vfork.S
|
asan_interceptors_vfork.S
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@ -42,12 +43,6 @@ set(ASAN_CXX_SOURCES
|
||||||
asan_new_delete.cpp
|
asan_new_delete.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT WIN32 AND NOT APPLE)
|
|
||||||
set(ASAN_STATIC_SOURCES
|
|
||||||
asan_rtl_x86_64.S
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(ASAN_PREINIT_SOURCES
|
set(ASAN_PREINIT_SOURCES
|
||||||
asan_preinit.cpp
|
asan_preinit.cpp
|
||||||
)
|
)
|
||||||
|
@ -140,12 +135,6 @@ if(NOT APPLE)
|
||||||
ADDITIONAL_HEADERS ${ASAN_HEADERS}
|
ADDITIONAL_HEADERS ${ASAN_HEADERS}
|
||||||
CFLAGS ${ASAN_CFLAGS}
|
CFLAGS ${ASAN_CFLAGS}
|
||||||
DEFS ${ASAN_COMMON_DEFINITIONS})
|
DEFS ${ASAN_COMMON_DEFINITIONS})
|
||||||
add_compiler_rt_object_libraries(RTAsan_static
|
|
||||||
ARCHS ${ASAN_SUPPORTED_ARCH}
|
|
||||||
SOURCES ${ASAN_STATIC_SOURCES}
|
|
||||||
ADDITIONAL_HEADERS ${ASAN_HEADERS}
|
|
||||||
CFLAGS ${ASAN_CFLAGS}
|
|
||||||
DEFS ${ASAN_COMMON_DEFINITIONS})
|
|
||||||
add_compiler_rt_object_libraries(RTAsan_preinit
|
add_compiler_rt_object_libraries(RTAsan_preinit
|
||||||
ARCHS ${ASAN_SUPPORTED_ARCH}
|
ARCHS ${ASAN_SUPPORTED_ARCH}
|
||||||
SOURCES ${ASAN_PREINIT_SOURCES}
|
SOURCES ${ASAN_PREINIT_SOURCES}
|
||||||
|
@ -187,14 +176,6 @@ if(APPLE)
|
||||||
LINK_FLAGS ${WEAK_SYMBOL_LINK_FLAGS}
|
LINK_FLAGS ${WEAK_SYMBOL_LINK_FLAGS}
|
||||||
DEFS ${ASAN_DYNAMIC_DEFINITIONS}
|
DEFS ${ASAN_DYNAMIC_DEFINITIONS}
|
||||||
PARENT_TARGET asan)
|
PARENT_TARGET asan)
|
||||||
|
|
||||||
add_compiler_rt_runtime(clang_rt.asan_static
|
|
||||||
STATIC
|
|
||||||
ARCHS ${ASAN_SUPPORTED_ARCH}
|
|
||||||
OBJECT_LIBS RTAsan_static
|
|
||||||
CFLAGS ${ASAN_CFLAGS}
|
|
||||||
DEFS ${ASAN_COMMON_DEFINITIONS}
|
|
||||||
PARENT_TARGET asan)
|
|
||||||
else()
|
else()
|
||||||
# Build separate libraries for each target.
|
# Build separate libraries for each target.
|
||||||
|
|
||||||
|
@ -226,14 +207,6 @@ else()
|
||||||
DEFS ${ASAN_COMMON_DEFINITIONS}
|
DEFS ${ASAN_COMMON_DEFINITIONS}
|
||||||
PARENT_TARGET asan)
|
PARENT_TARGET asan)
|
||||||
|
|
||||||
add_compiler_rt_runtime(clang_rt.asan_static
|
|
||||||
STATIC
|
|
||||||
ARCHS ${ASAN_SUPPORTED_ARCH}
|
|
||||||
OBJECT_LIBS RTAsan_static
|
|
||||||
CFLAGS ${ASAN_CFLAGS}
|
|
||||||
DEFS ${ASAN_COMMON_DEFINITIONS}
|
|
||||||
PARENT_TARGET asan)
|
|
||||||
|
|
||||||
add_compiler_rt_runtime(clang_rt.asan-preinit
|
add_compiler_rt_runtime(clang_rt.asan-preinit
|
||||||
STATIC
|
STATIC
|
||||||
ARCHS ${ASAN_SUPPORTED_ARCH}
|
ARCHS ${ASAN_SUPPORTED_ARCH}
|
||||||
|
|
|
@ -261,7 +261,6 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS AND NOT ANDROID)
|
||||||
set(ASAN_TEST_RUNTIME_OBJECTS
|
set(ASAN_TEST_RUNTIME_OBJECTS
|
||||||
$<TARGET_OBJECTS:RTAsan.${arch}>
|
$<TARGET_OBJECTS:RTAsan.${arch}>
|
||||||
$<TARGET_OBJECTS:RTAsan_cxx.${arch}>
|
$<TARGET_OBJECTS:RTAsan_cxx.${arch}>
|
||||||
$<TARGET_OBJECTS:RTAsan_static.${arch}>
|
|
||||||
$<TARGET_OBJECTS:RTInterception.${arch}>
|
$<TARGET_OBJECTS:RTInterception.${arch}>
|
||||||
$<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
|
$<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
|
||||||
$<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>
|
$<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>
|
||||||
|
@ -287,7 +286,6 @@ if(ANDROID)
|
||||||
# Test w/o ASan instrumentation. Link it with ASan statically.
|
# Test w/o ASan instrumentation. Link it with ASan statically.
|
||||||
add_executable(AsanNoinstTest # FIXME: .arch?
|
add_executable(AsanNoinstTest # FIXME: .arch?
|
||||||
$<TARGET_OBJECTS:RTAsan.${arch}>
|
$<TARGET_OBJECTS:RTAsan.${arch}>
|
||||||
$<TARGET_OBJECTS:RTAsan_static.${arch}>
|
|
||||||
$<TARGET_OBJECTS:RTInterception.${arch}>
|
$<TARGET_OBJECTS:RTInterception.${arch}>
|
||||||
$<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
|
$<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
|
||||||
$<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>
|
$<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>
|
||||||
|
|
Loading…
Reference in New Issue