Compile for Windows with /Zc:inline.
By default, MSVC generates standalone versions of all functions, including static inline functions that are only inlined. Those standalone versions are dead code. This /Zc:inline flag makes MSVC behave like all the other compilers, omitting those standalone functions. Chrome builds with this flag. This CL cuts dm.exe and nanobench.exe each down by about 3MB, 19->16MB for DM and 15MB->12MB for nanobench. This shouldn't affect runtime speed, and didn't signficantly change clean build time on my Z840 (~90s either way). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3735 Change-Id: Ibd2a80337fcefc3f4eaf4335ea4e95a80bb4fddb Reviewed-on: https://skia-review.googlesource.com/3735 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Ben Wagner <bungeman@google.com>
This commit is contained in:
parent
80739b842a
commit
916ca1d8a0
@ -329,7 +329,10 @@ config("no_rtti") {
|
||||
|
||||
config("release") {
|
||||
if (is_win) {
|
||||
cflags = [ "/O2" ]
|
||||
cflags = [
|
||||
"/O2",
|
||||
"/Zc:inline",
|
||||
]
|
||||
} else {
|
||||
cflags = [
|
||||
"-O3",
|
||||
|
Loading…
Reference in New Issue
Block a user