mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:29:48 +00:00
[build] Increase linker optimization level to match Flutter and Fuchsia.
Reduces VM code size by about 15k. Change-Id: Icaa1a5278855f88f7ce702802d6aaa62639cfac5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205120 Reviewed-by: Régis Crelier <regis@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
parent
9c190c5e00
commit
1acc926edd
|
@ -698,7 +698,10 @@ if (is_win) {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
common_optimize_on_ldflags = [
|
common_optimize_on_ldflags = [
|
||||||
|
# Linker GC.
|
||||||
"/OPT:REF",
|
"/OPT:REF",
|
||||||
|
# Identical code folding to reduce size.
|
||||||
|
# Warning: This changes C/C++ semantics of function pointer comparison.
|
||||||
"/OPT:ICF",
|
"/OPT:ICF",
|
||||||
]
|
]
|
||||||
} else {
|
} else {
|
||||||
|
@ -729,7 +732,7 @@ if (is_win) {
|
||||||
common_optimize_on_ldflags += [
|
common_optimize_on_ldflags += [
|
||||||
# Specifically tell the linker to perform optimizations.
|
# Specifically tell the linker to perform optimizations.
|
||||||
# See http://lwn.net/Articles/192624/ .
|
# See http://lwn.net/Articles/192624/ .
|
||||||
"-Wl,-O1",
|
"-Wl,-O2",
|
||||||
"-Wl,--gc-sections",
|
"-Wl,--gc-sections",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue