Commit 59d6b505 authored by Pawel Pluciennik's avatar Pawel Pluciennik Committed by Commit Bot

Mac build with symbol_level=1 is larger than it's possible.

Code review contains measurements that dead code stripping on
(-Wl,-dead_strip) doesn't seem to affect linking performance.
See https://chromium-review.googlesource.com/c/chromium/src/+/1792702.

Dead code stripping seems to save about 50% binary size.
For protoc binary it's 5.6MB vs 4.2MB.

Bug: 1002023
Change-Id: I361d66b8fca26262a003bc2c143cb1871cdc4d1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1792702
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695628}
parent 3bf4b9c1
...@@ -1924,7 +1924,7 @@ if (is_win) { ...@@ -1924,7 +1924,7 @@ if (is_win) {
} }
if (is_mac || is_ios) { if (is_mac || is_ios) {
if (symbol_level == 2) { if (symbol_level > 0) {
# Mac dead code stripping requires symbols. # Mac dead code stripping requires symbols.
common_optimize_on_ldflags += [ "-Wl,-dead_strip" ] common_optimize_on_ldflags += [ "-Wl,-dead_strip" ]
} }
......
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