From cfca818ef7b8a3659c41d741c90b38c69478598a Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Thu, 14 Nov 2019 09:18:44 -0800 Subject: [PATCH] [cmake] Emit an error for -DBUILD_SHARED_LIBS=ON on Windows Summary: The BUILD_SHARED_LIBS=ON build fails on Windows, so prevent users from enabling it. Reviewers: beanz, smeenai, compnerd, phosek Reviewed By: beanz Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70161 --- llvm/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 2a6ec2b..b1a51b3 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -574,6 +574,9 @@ if(MSVC) # Set this variable to OFF here so it can't be set with a command-line # argument. set (LLVM_LINK_LLVM_DYLIB OFF) + if (BUILD_SHARED_LIBS) + message(FATAL_ERROR "BUILD_SHARED_LIBS options is not supported on Windows.") + endif() else() option(LLVM_LINK_LLVM_DYLIB "Link tools against the libllvm dynamic library" OFF) option(LLVM_BUILD_LLVM_C_DYLIB "Build libllvm-c re-export library (Darwin only)" OFF) -- 2.7.4