Commit a2adba27 authored by pcc's avatar pcc Committed by Commit bot

build: Enable -fwhole-program-vtables under ThinLTO.

This feature has been supported under ThinLTO for some time now.

BUG=660216
R=thakis@chromium.org

Review-Url: https://codereview.chromium.org/2890573002
Cr-Commit-Position: refs/heads/master@{#472304}
parent 1c2f3f0b
...@@ -485,16 +485,8 @@ config("compiler") { ...@@ -485,16 +485,8 @@ config("compiler") {
rebase_path("$root_out_dir/thinlto-cache", root_build_dir), rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
] ]
} else { } else {
# Note: ThinLTO does not currently have this feature implemented cflags += [ "-flto" ]
# For Full LTO, it provides a measurable runtime speedup of Chrome. ldflags += [ "-flto" ]
cflags += [
"-flto",
"-fwhole-program-vtables",
]
ldflags += [
"-flto",
"-fwhole-program-vtables",
]
# Apply a lower LTO optimization level as the default is too slow. # Apply a lower LTO optimization level as the default is too slow.
if (is_linux) { if (is_linux) {
...@@ -504,6 +496,9 @@ config("compiler") { ...@@ -504,6 +496,9 @@ config("compiler") {
} }
} }
cflags += [ "-fwhole-program-vtables" ]
ldflags += [ "-fwhole-program-vtables" ]
# Work-around for http://openradar.appspot.com/20356002 # Work-around for http://openradar.appspot.com/20356002
if (is_mac) { if (is_mac) {
ldflags += [ "-Wl,-all_load" ] ldflags += [ "-Wl,-all_load" ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment