Commit 9795f362 authored by Hans Wennborg's avatar Hans Wennborg Committed by Commit Bot

Build with -Wl,--no-call-graph-profile-sort on Android

LLD will sort the binary section based on a call-graph profile when such
profile information is available in the object files. Since the last
Clang roll, that information gets written to the object files when
building with a profile (as is done on Android).

Since call-graph sorting leads to larger binaries on Android, and we
already have good section order files there, tell the linker to disable
it.

Bug: 1110413, 1107461
Change-Id: I4f37c57dd65437c4269b0e216f64102ae233aeeb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332398Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#793638}
parent 1c9aeef8
...@@ -694,6 +694,12 @@ config("compiler") { ...@@ -694,6 +694,12 @@ config("compiler") {
ldflags += [ "-Wl,--no-rosegment" ] ldflags += [ "-Wl,--no-rosegment" ]
} }
# Don't do call-graph-sorted binary layout on Android, as that increases the
# binary size due to more thunks for long jumps.
if (use_lld && is_android) {
ldflags += [ "-Wl,--no-call-graph-profile-sort" ]
}
# This flag enforces that member pointer base types are complete. It helps # This flag enforces that member pointer base types are complete. It helps
# prevent us from running into problems in the Microsoft C++ ABI (see # prevent us from running into problems in the Microsoft C++ ABI (see
# https://crbug.com/847724). # https://crbug.com/847724).
......
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