Disable ICF on Darwin, make it default for Release
ICF is not supported by Darwin's linker. On other platforms, it should
be the default unless building as debug.
Change-Id: Iad496e95596fb6dd1f0cc32f3b6b19d97a0f3765
Reviewed-on: https://gn-review.googlesource.com/c/3741
Commit-Queue: Petr Hosek <phosek@google.com>
Reviewed-by: Scott Graham <scottmg@chromium.org>
diff --git a/build/gen.py b/build/gen.py
index 0ee66e2..ee4f8e1 100755
--- a/build/gen.py
+++ b/build/gen.py
@@ -83,8 +83,6 @@
choices=Platform.known_platforms())
parser.add_option('--use-lto', action='store_true',
help='Enable the use of LTO')
- parser.add_option('--use-icf', action='store_true',
- help='Enable the use of Identical Code Folding')
parser.add_option('--no-last-commit-position', action='store_true',
help='Do not generate last_commit_position.h.')
parser.add_option('--out-path',
@@ -301,7 +299,7 @@
ldflags.append('-Wl,-strip-all')
# Enable identical code-folding.
- if options.use_icf:
+ if not platform.is_darwin():
ldflags.append('-Wl,--icf=all')
cflags.extend([