aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authork.h.lai <dlshcbmuipmam@hotmail.com>2020-04-28 02:44:52 +0800
committerGitHub <noreply@github.com>2020-04-27 20:44:52 +0200
commitaef59f2ad9a5a5a217ddadc05c46fd4d23cef47f (patch)
tree121bda38d49a64610fac78cf006477bff9df77aa /src
parentca8957f500980849fbd3e0c05b7cf3272b18ac97 (diff)
downloadminetest-aef59f2ad9a5a5a217ddadc05c46fd4d23cef47f.tar.gz
minetest-aef59f2ad9a5a5a217ddadc05c46fd4d23cef47f.tar.bz2
minetest-aef59f2ad9a5a5a217ddadc05c46fd4d23cef47f.zip
Remove /LTCG from when compiling with clang-cl (#9765)
Remove /LTCG from CMAKE_EXE_LINKER_FLAGS_RELEASE when compiling with clang on Windows
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index dbd6b5922..b416faaf3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -676,9 +676,12 @@ if(MSVC)
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /arch:SSE")
endif()
- #set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/LTCG /NODEFAULTLIB:\"libcmtd.lib\" /NODEFAULTLIB:\"libcmt.lib\"")
- set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/LTCG /INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF")
-
+
+ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF")
+ else()
+ set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/LTCG /INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF")
+ endif()
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup")