[PATCH] D44499: [Scudo] Avoid accidental references of C++ library

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 15 16:13:43 PDT 2018


phosek updated this revision to Diff 138646.

https://reviews.llvm.org/D44499

Files:
  compiler-rt/lib/scudo/CMakeLists.txt


Index: compiler-rt/lib/scudo/CMakeLists.txt
===================================================================
--- compiler-rt/lib/scudo/CMakeLists.txt
+++ compiler-rt/lib/scudo/CMakeLists.txt
@@ -10,8 +10,8 @@
 set(SCUDO_DYNAMIC_LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS})
 
 # Use gc-sections by default to avoid unused code being pulled in.
-list(APPEND SCUDO_CFLAGS -ffunction-sections -fdata-sections)
-list(APPEND SCUDO_DYNAMIC_LINK_FLAGS -Wl,--gc-sections)
+list(APPEND SCUDO_CFLAGS -nostdinc++ -ffunction-sections -fdata-sections)
+list(APPEND SCUDO_DYNAMIC_LINK_FLAGS -Wl,-nostdlib++ -Wl,--gc-sections)
 
 set(SCUDO_SOURCES
   scudo_allocator.cpp


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44499.138646.patch
Type: text/x-patch
Size: 656 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180315/142c4dcd/attachment.bin>


More information about the llvm-commits mailing list