summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-28 21:27:44 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-28 21:27:44 +0000
commitc9cc9441ec59bbba1eb942d03fc45553b7fb4a41 (patch)
treedfe026053be86b1ed24ae8968d7c423caa930699
parent3507abc683515f75330928f1cbcb8711f9dbdff9 (diff)
downloadchromium_src-c9cc9441ec59bbba1eb942d03fc45553b7fb4a41.zip
chromium_src-c9cc9441ec59bbba1eb942d03fc45553b7fb4a41.tar.gz
chromium_src-c9cc9441ec59bbba1eb942d03fc45553b7fb4a41.tar.bz2
Add mac_write_linker_maps gyp define.
With GYP_DEFINES=mac_write_linker_maps=1, ld64 will be instructed to write .map files, which can then be visualized to get an idea of binary size. (Works best in a static library build.) BUG=none Review URL: https://codereview.chromium.org/116443008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242693 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/common.gypi12
1 files changed, 12 insertions, 0 deletions
diff --git a/build/common.gypi b/build/common.gypi
index dd99925..fac1a9e 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -1092,6 +1092,11 @@
'clang_load%': '',
'clang_add_plugin%': '',
+ # Tell ld64 to write map files describing binary layout. Useful
+ # for looking at what contributes to binary size, e.g. with
+ # https://github.com/nico/bloat
+ 'mac_write_linker_maps%': 0,
+
# The default type of gtest.
'gtest_target_type%': 'executable',
@@ -4092,6 +4097,13 @@
],
},
}],
+ ['mac_write_linker_maps==1', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '-Wl,-map,>(_target_name).map',
+ ],
+ },
+ }],
],
}],
['_mac_bundle', {