You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by jx...@apache.org on 2018/03/29 18:22:10 UTC
[incubator-mxnet] branch master updated: [not merge]add OPT:REF,
Reduce the size of the windows binary file. (#9985)
This is an automated email from the ASF dual-hosted git repository.
jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 048f4c2 [not merge]add OPT:REF,Reduce the size of the windows binary file. (#9985)
048f4c2 is described below
commit 048f4c268a2548586516843483d613378cc8ef51
Author: Hu Shiwen <ya...@gmail.com>
AuthorDate: Fri Mar 30 02:21:59 2018 +0800
[not merge]add OPT:REF,Reduce the size of the windows binary file. (#9985)
* add OPT:REF,Reduce the size of the binary file.
* up
---
CMakeLists.txt | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b32e71d..116de37 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -573,7 +573,14 @@ if(NOT MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /EHsc")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /EHsc /Gy")
+ set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /EHsc /Gy")
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /EHsc /Gy")
+ set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /OPT:REF /OPT:ICF")
+ set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "${CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL} /OPT:REF /OPT:ICF")
+ set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /OPT:REF /OPT:ICF")
+
endif()
set(MXNET_INSTALL_TARGETS mxnet)
@@ -590,8 +597,8 @@ endif()
if(USE_CUDA)
if(FIRST_CUDA AND MSVC)
- target_compile_options(mxnet PUBLIC "$<$<CONFIG:DEBUG>:-Xcompiler=-MTd>")
- target_compile_options(mxnet PUBLIC "$<$<CONFIG:RELEASE>:-Xcompiler=-MT>")
+ target_compile_options(mxnet PUBLIC "$<$<CONFIG:DEBUG>:-Xcompiler=-MTd -Gy>")
+ target_compile_options(mxnet PUBLIC "$<$<CONFIG:RELEASE>:-Xcompiler=-MT -Gy>")
endif()
endif()
if(USE_DIST_KVSTORE)
--
To stop receiving notification emails like this one, please contact
jxie@apache.org.