[llvm] cfca818 - [cmake] Emit an error for -DBUILD_SHARED_LIBS=ON on Windows

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 14 10:19:43 PST 2019


Author: Tom Stellard
Date: 2019-11-14T10:19:02-08:00
New Revision: cfca818ef7b8a3659c41d741c90b38c69478598a

URL: https://github.com/llvm/llvm-project/commit/cfca818ef7b8a3659c41d741c90b38c69478598a
DIFF: https://github.com/llvm/llvm-project/commit/cfca818ef7b8a3659c41d741c90b38c69478598a.diff

LOG: [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

Added: 
    

Modified: 
    llvm/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 2a6ec2b7549d..b1a51b332ff0 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)


        


More information about the llvm-commits mailing list