diff --git a/llvm/utils/gn/build/BUILD.gn b/llvm/utils/gn/build/BUILD.gn --- a/llvm/utils/gn/build/BUILD.gn +++ b/llvm/utils/gn/build/BUILD.gn @@ -444,6 +444,7 @@ "-funwind-tables", "-gline-tables-only", "-fvisibility=hidden", + "-fno-builtin", ] if (is_clang) { cflags += [ diff --git a/llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn b/llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn --- a/llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn +++ b/llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn @@ -102,9 +102,7 @@ sources += [ "asan_interceptors_vfork.S" ] } - # 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" ] } diff --git a/llvm/utils/gn/secondary/compiler-rt/lib/msan/BUILD.gn b/llvm/utils/gn/secondary/compiler-rt/lib/msan/BUILD.gn --- a/llvm/utils/gn/secondary/compiler-rt/lib/msan/BUILD.gn +++ b/llvm/utils/gn/secondary/compiler-rt/lib/msan/BUILD.gn @@ -39,11 +39,7 @@ "msan_thread.h", ] - # 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" ] diff --git a/llvm/utils/gn/secondary/compiler-rt/lib/tsan/rtl/BUILD.gn b/llvm/utils/gn/secondary/compiler-rt/lib/tsan/rtl/BUILD.gn --- a/llvm/utils/gn/secondary/compiler-rt/lib/tsan/rtl/BUILD.gn +++ b/llvm/utils/gn/secondary/compiler-rt/lib/tsan/rtl/BUILD.gn @@ -128,10 +128,6 @@ sources += [ "tsan_rtl_s390x.S" ] } - # 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)