aboutsummaryrefslogtreecommitdiff
path: root/llvm/CMakeLists.txt
diff options
context:
space:
mode:
authorAiden Grossman <agrossman154@yahoo.com>2023-05-28 02:34:30 +0000
committerAiden Grossman <agrossman154@yahoo.com>2023-06-07 07:27:53 +0000
commit8df5841c2574705def3d4a96ef5da4d32d64b39b (patch)
tree0c2b93af5ebc0570aa5b318d201dc7fb23f98ed3 /llvm/CMakeLists.txt
parent57882fe76e1826593cd0e53f73484b184c5007c4 (diff)
downloadllvm-8df5841c2574705def3d4a96ef5da4d32d64b39b.zip
llvm-8df5841c2574705def3d4a96ef5da4d32d64b39b.tar.gz
llvm-8df5841c2574705def3d4a96ef5da4d32d64b39b.tar.bz2
[CMake] Add option to link LLVM/subproject executables against LLVM libc
This patch adds in CMake option LLVM_ENABLE_LLVM_LIBC which when set to true automatically builds LLVM libc in overlay mode and links all generated executables against the libc overlay. This is intended to somewhat mirror the LLVM_ENABLE_LIBCXX flag. Differential Revision: https://reviews.llvm.org/D151013
Diffstat (limited to 'llvm/CMakeLists.txt')
-rw-r--r--llvm/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index dfe81ad..637b875 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -558,6 +558,7 @@ else()
endif()
option(LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY "Compile with -fmodules-local-submodule-visibility." ON)
option(LLVM_ENABLE_LIBCXX "Use libc++ if available." OFF)
+option(LLVM_ENABLE_LLVM_LIBC "Set to on to link all LLVM executables against LLVM libc, assuming it is accessible by the host compiler." OFF)
option(LLVM_STATIC_LINK_CXX_STDLIB "Statically link the standard library." OFF)
option(LLVM_ENABLE_LLD "Use lld as C and C++ linker." OFF)
option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)