[compiler-rt] 52139d8 - [compiler-rt][nsan] Modify NSAN_CFLAGS setting (#98768)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 13 23:13:41 PDT 2024
Author: Dmitriy Chestnykh
Date: 2024-07-13T23:13:38-07:00
New Revision: 52139d8f9a4e3f595ca552393d62ba06b0bc082c
URL: https://github.com/llvm/llvm-project/commit/52139d8f9a4e3f595ca552393d62ba06b0bc082c
DIFF: https://github.com/llvm/llvm-project/commit/52139d8f9a4e3f595ca552393d62ba06b0bc082c.diff
LOG: [compiler-rt][nsan] Modify NSAN_CFLAGS setting (#98768)
Use -fno-rtti flag to avoid vtables in the runtime library (similarly to asan, dfsan, msan).
Remove unneeded -fPIC from NSAN_CFLAGS.
Fix #98767
Added:
Modified:
compiler-rt/lib/nsan/CMakeLists.txt
Removed:
################################################################################
diff --git a/compiler-rt/lib/nsan/CMakeLists.txt b/compiler-rt/lib/nsan/CMakeLists.txt
index 1e138d4560c89..acadb09c3332b 100644
--- a/compiler-rt/lib/nsan/CMakeLists.txt
+++ b/compiler-rt/lib/nsan/CMakeLists.txt
@@ -23,11 +23,11 @@ set(NSAN_HEADERS
nsan_suppressions.h
)
-append_list_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC NSAN_CFLAGS)
-
set(NSAN_DYNAMIC_LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS})
set(NSAN_CFLAGS ${SANITIZER_COMMON_CFLAGS})
+append_rtti_flag(OFF NSAN_CFLAGS)
+
set(NSAN_DYNAMIC_CFLAGS ${NSAN_CFLAGS})
set(NSAN_COMMON_RUNTIME_OBJECT_LIBS
More information about the llvm-commits
mailing list