Commit 2599c7d2 authored by George Burgess IV's avatar George Burgess IV Committed by Commit Bot

build: move chromeos' import-instr-limits into chrome

These existed in the ebuild before for no particular reason. Having them
sitting in Chrome seems more theoretically good, and fixes a small bug
with some of our simplechrome builders (they weren't picking up the =20
or =30 limits properly, so they were doing =100...)

Bug: 937821
Change-Id: I3f89354d377de2e4db7c1b11b644b07867d3b66c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2446818
Commit-Queue: George Burgess <gbiv@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813446}
parent 4872b270
......@@ -656,10 +656,25 @@ config("compiler") {
ldflags += [ "-Wl,--lto-O" + lto_opt_level ]
if (thin_lto_enable_optimizations) {
# TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO
# should be able to better manage binary size increases on its own.
import_instr_limit = -1
if (is_android) {
# TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO
# should be able to better manage binary size increases on its own.
ldflags += [ "-Wl,-mllvm,-import-instr-limit=5" ]
import_instr_limit = 5
} else if (is_chromeos) {
# Not much performance difference was noted between the default (100)
# and these. ARM was originally set lower than x86 to keep the size
# bloat of ThinLTO to <10%, but that's potentially no longer true.
# FIXME(inglorion): maybe tune these?
if (target_cpu == "arm" || target_cpu == "arm64") {
import_instr_limit = 20
} else {
import_instr_limit = 30
}
}
if (import_instr_limit != -1) {
ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ]
}
}
}
......
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