mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-01 00:35:43 +00:00
[windows] Add /Gw to compiler flags
This is like -fdata-sections, and it's not part of /O2 by default for some reason. In the cmake build, reduces the size of clang.exe from 70,358,016 bytes to 69,982,720 bytes. clang-format.exe goes from 3,703,296 bytes to 3,331,072 bytes. Differential Revision: https://reviews.llvm.org/D74573
This commit is contained in:
parent
65d3ccce3d
commit
eeff3458f0
@ -793,6 +793,10 @@ if(NOT CYGWIN AND NOT WIN32)
|
||||
endif()
|
||||
add_flag_if_supported("-fdata-sections" FDATA_SECTIONS)
|
||||
endif()
|
||||
elseif(MSVC)
|
||||
if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )
|
||||
append("/Gw" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
|
@ -59,8 +59,8 @@ config("compiler_defaults") {
|
||||
}
|
||||
if (is_optimized) {
|
||||
cflags += [
|
||||
# FIXME: evaluate /Gw (not part of /O2)
|
||||
"/O2",
|
||||
"/Gw",
|
||||
"/Zc:inline",
|
||||
]
|
||||
ldflags += [
|
||||
|
Loading…
x
Reference in New Issue
Block a user