Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2022-05-18 18:09:09 +0300
committerGuillaume Chatelet <gchatelet@google.com>2022-05-19 12:08:42 +0300
commit94d6dd90576637fa0eb2c40ca92320ad4c1a6942 (patch)
tree487caad7be6218d4ce9a459e2c797c3a3a3685d6 /libc/cmake/modules/LLVMLibCObjectRules.cmake
parent4e8b2ac7c01982f05d10e100299dadb5d4c79c5e (diff)
[libc] Apply no-builtin everywhere, remove unnecessary flags
Some functions like `stpncpy` are implemented in terms of `memset` but are not currently using `-fno-builtin-memset`. This is somewhat hidden by the fact that we use `-ffreestanding` globally and that `-ffreestanding` implies `-fno-builtin` for Clang. This patch also removes `-mllvm -combiner-global-alias-analysis` that is Clang specific and that does not bring substantial gains on modern processors. Also we keep `-mllvm --tail-merge-threshold=0` for aarch64 in CMakeLists.txt but we omit it in the Bazel config. This is because Bazel consumes the source files directly and so it can use PGO to take optimal decisions locally. Differential Revision: https://reviews.llvm.org/D125894
Diffstat (limited to 'libc/cmake/modules/LLVMLibCObjectRules.cmake')
-rw-r--r--libc/cmake/modules/LLVMLibCObjectRules.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake
index 8e2f489752a6..2544a648c8a5 100644
--- a/libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -3,7 +3,7 @@ set(OBJECT_LIBRARY_TARGET_TYPE "OBJECT_LIBRARY")
function(_get_common_compile_options output_var)
set(compile_options ${LLVM_CXX_STD_default} ${LIBC_COMPILE_OPTIONS_DEFAULT} ${ARGN})
if(NOT ${LIBC_TARGET_OS} STREQUAL "windows")
- set(compile_options ${compile_options} -fpie -ffreestanding)
+ set(compile_options ${compile_options} -fpie -ffreestanding -fno-builtin)
endif()
if(LLVM_COMPILER_IS_GCC_COMPATIBLE)
list(APPEND compile_options "-fno-exceptions")