[llvm] 5d035c5 - [cmake] Prevent building with BUILD_SHARED_LIBS and LLVM_LINK_LLVM_DYLIB
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 13 21:29:58 PST 2019
Author: Tom Stellard
Date: 2019-11-13T21:29:31-08:00
New Revision: 5d035c5d8fe6f8a20ba8d1b749f0f91100ae347a
URL: https://github.com/llvm/llvm-project/commit/5d035c5d8fe6f8a20ba8d1b749f0f91100ae347a
DIFF: https://github.com/llvm/llvm-project/commit/5d035c5d8fe6f8a20ba8d1b749f0f91100ae347a.diff
LOG: [cmake] Prevent building with BUILD_SHARED_LIBS and LLVM_LINK_LLVM_DYLIB
Summary: This doesn't work, so error early if someone tries it.
Reviewers: beanz, smeenai, compnerd, phosek
Reviewed By: beanz
Subscribers: mgorny, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70160
Added:
Modified:
llvm/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 0aa22c6deb08..2a6ec2b7549d 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -584,6 +584,10 @@ else()
option(LLVM_BUILD_LLVM_DYLIB "Build libllvm dynamic library" ${LLVM_BUILD_LLVM_DYLIB_default})
endif()
+if (LLVM_LINK_LLVM_DYLIB AND BUILD_SHARED_LIBS)
+ message(FATAL_ERROR "Cannot enable BUILD_SHARED_LIBS with LLVM_LINK_LLVM_DYLIB. We recommend disabling BUILD_SHARED_LIBS.")
+endif()
+
option(LLVM_OPTIMIZED_TABLEGEN "Force TableGen to be built with optimization" OFF)
if(CMAKE_CROSSCOMPILING OR (LLVM_OPTIMIZED_TABLEGEN AND (LLVM_ENABLE_ASSERTIONS OR CMAKE_CONFIGURATION_TYPES)))
set(LLVM_USE_HOST_TOOLS ON)
More information about the llvm-commits
mailing list