Chromium Code Reviews| Index: build/config/compiler/BUILD.gn |
| diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
| index 3cf72220237662772be19973c54a9c9de54012fd..1550c0d75308a8028d48af3607207aa53fb18b4a 100644 |
| --- a/build/config/compiler/BUILD.gn |
| +++ b/build/config/compiler/BUILD.gn |
| @@ -86,6 +86,10 @@ declare_args() { |
| # TODO(brettw) it's weird that Mac and desktop Linux are different. We should |
| # explore favoring size over speed in this case as well. |
| optimize_for_size = is_android || is_ios |
| + |
| + # Gold icf level, values are "none", "safe", "all". If value isn't overridden, |
| + # default initialization is below. |
| + gold_icf_level = "" |
| } |
| # Apply the default logic for these values if they were not set explicitly. |
| @@ -103,6 +107,16 @@ if (use_debug_fission == "default") { |
| linux_use_bundled_binutils && cc_wrapper == "" |
| } |
| +if (gold_icf_level == "") { |
| + if (use_gold && !is_clang) { |
| + # Gold doesn't respect section alignment and breaks gcc builds with icf |
| + # https://bugs.chromium.org/p/chromium/issues/detail?id=576197 |
| + gold_icf_level = "none" |
| + } else { |
| + gold_icf_level = "all" |
|
Dirk Pranke
2016/04/15 21:20:55
I think you need to actually use this, also? I don
Lukasz Jagielski
2016/04/19 17:01:48
Done.
|
| + } |
| +} |
| + |
| # default_include_dirs --------------------------------------------------------- |
| # |
| # This is a separate config so that third_party code (which would not use the |