[compiler-rt] r327876 - Fix CMake/MSVC when compiler-rt and llvm are built separately

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 19 11:22:36 PDT 2018


Author: vitalybuka
Date: Mon Mar 19 11:22:35 2018
New Revision: 327876

URL: http://llvm.org/viewvc/llvm-project?rev=327876&view=rev
Log:
Fix CMake/MSVC when compiler-rt and llvm are built separately

Summary:
For some reason CMake can't find the `append` macro if LLVM is built separately and imported via `LLVM_CONFIG_PATH`.

Patch by Loo Rong Jie

Reviewers: rnk, vitalybuka

Reviewed By: rnk, vitalybuka

Subscribers: dberris, mgorny, llvm-commits, #sanitizers

Differential Revision: https://reviews.llvm.org/D43458

Modified:
    compiler-rt/trunk/CMakeLists.txt

Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=327876&r1=327875&r2=327876&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Mon Mar 19 11:22:35 2018
@@ -339,7 +339,7 @@ if (CMAKE_LINKER MATCHES "link.exe$")
   # it, but CMake doesn't seem to have a way to set linker flags for
   # individual static libraries, so we enable the suppression flag for
   # the whole compiler-rt project.
-  append("/IGNORE:4221" CMAKE_STATIC_LINKER_FLAGS)
+  set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /IGNORE:4221")
 endif()
 
 add_subdirectory(include)




More information about the llvm-commits mailing list