[PATCH] D118288: [gn build] Move -fno-builtin to crt_code

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 26 15:08:56 PST 2022


aeubanks created this revision.
aeubanks added a reviewer: thakis.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

crt_code seems to correspond to SANITIZER_COMMON_CFLAGS which contains -fno-builtin.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118288

Files:
  llvm/utils/gn/build/BUILD.gn
  llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn
  llvm/utils/gn/secondary/compiler-rt/lib/msan/BUILD.gn
  llvm/utils/gn/secondary/compiler-rt/lib/tsan/rtl/BUILD.gn


Index: llvm/utils/gn/secondary/compiler-rt/lib/tsan/rtl/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/compiler-rt/lib/tsan/rtl/BUILD.gn
+++ llvm/utils/gn/secondary/compiler-rt/lib/tsan/rtl/BUILD.gn
@@ -131,10 +131,6 @@
   # To be able to include sanitizer_common.
   include_dirs = [ ".." ]
 
-  # FIXME: have SANITIZER_COMMON_CFLAGS thingy? should fno-builtin be in
-  # crt_code?
-  cflags += [ "-fno-builtin" ]
-
   # FIXME: link rt dl m pthread log
   # FIXME: dep on libcxx-headers?
   # FIXME: add_sanitizer_rt_version_list (cf hwasan)
Index: llvm/utils/gn/secondary/compiler-rt/lib/msan/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/compiler-rt/lib/msan/BUILD.gn
+++ llvm/utils/gn/secondary/compiler-rt/lib/msan/BUILD.gn
@@ -42,11 +42,7 @@
   # To be able to include sanitizer_common.
   include_dirs = [ ".." ]
 
-  # FIXME: have SANITIZER_COMMON_CFLAGS thingy? should fno-builtin be in
-  # crt_code?
-  cflags = [ "-fno-builtin" ]
-
-  cflags += [ "-fPIE" ]
+  cflags = [ "-fPIE" ]
 
   # Prevent clang from generating libc calls.
   cflags += [ "-ffreestanding" ]
Index: llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn
+++ llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn
@@ -105,9 +105,7 @@
   # To be able to include sanitizer_common.
   include_dirs = [ ".." ]
 
-  # FIXME: have SANITIZER_COMMON_CFLAGS thingy? should fno-builtin be in
-  # crt_code?
-  cflags = [ "-fno-builtin" ]
+  cflags = []
   if (target_os != "win") {
     cflags += [ "-ftls-model=initial-exec" ]
   }
Index: llvm/utils/gn/build/BUILD.gn
===================================================================
--- llvm/utils/gn/build/BUILD.gn
+++ llvm/utils/gn/build/BUILD.gn
@@ -444,6 +444,7 @@
     "-funwind-tables",
     "-gline-tables-only",
     "-fvisibility=hidden",
+    "-fno-builtin",
   ]
   if (is_clang) {
     cflags += [


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118288.403417.patch
Type: text/x-patch
Size: 2078 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220126/db637c77/attachment.bin>


More information about the llvm-commits mailing list