Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>2022-11-13 07:21:03 +0300
committerGitHub <noreply@github.com>2022-11-13 07:21:03 +0300
commitc8f8231d2c62f26159f05181f91d3ca8d231b754 (patch)
tree411bf5273577edb6ff628a1916966a335bf47c3a
parentb117dbcc0bbbd2c9ba13f7aa668d10c9a225273c (diff)
Dynamically link ucrt to objwriter.dllMichalStrehovsky-patch-1
This is how we link CRT in the runtime repo:
-rw-r--r--llvm/tools/objwriter/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/tools/objwriter/CMakeLists.txt b/llvm/tools/objwriter/CMakeLists.txt
index caa4a8880797..8838783892dd 100644
--- a/llvm/tools/objwriter/CMakeLists.txt
+++ b/llvm/tools/objwriter/CMakeLists.txt
@@ -7,6 +7,11 @@ set(LLVM_LINK_COMPONENTS
Support
)
+if (MSVC)
+ # Force uCRT to be dynamically linked for Release build
+ set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib")
+endif()
+
message(STATUS "ObjWriter configuring with (${CMAKE_BUILD_TYPE}) build type and (${LLVM_DEFAULT_TARGET_TRIPLE}) default target triple")
add_llvm_library(objwriter SHARED