Chromium Code Reviews| Index: build/config/compiler/BUILD.gn |
| diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
| index 5e1e024ea5ff15eebdb3307d77058d67673073c9..4c32281faba650b5b8856c5ff9632376b2421c5d 100644 |
| --- a/build/config/compiler/BUILD.gn |
| +++ b/build/config/compiler/BUILD.gn |
| @@ -1308,10 +1308,8 @@ config("no_optimize") { |
| } |
| } |
| -# Turns up the optimization level. On Windows, this implies whole program |
| -# optimization and link-time code generation which is very expensive and should |
| -# be used sparingly. |
| -config("optimize_max") { |
| +# Internal common config used by optimize_max and optimize_component. |
| +config("common_optimize_max") { |
|
Michael Achenbach
2016/05/30 11:38:07
Is there a better way to share a common config wit
Dirk Pranke
2016/05/31 19:46:18
Not really, but it's not something we tend to worr
|
| if (is_nacl_irt) { |
| # The NaCl IRT is a special case and always wants its own config. |
| # Various components do: |
| @@ -1341,12 +1339,32 @@ config("optimize_max") { |
| "/wd4702", |
| ] |
| } |
| - } else { |
| + } |
| + } |
| +} |
| + |
| +# Turns up the optimization level. On Windows, this implies whole program |
| +# optimization and link-time code generation which is very expensive and should |
| +# be used sparingly. |
| +config("optimize_max") { |
| + configs = [ ":common_optimize_max" ] |
|
Michael Achenbach
2016/05/30 11:38:07
Does the line:
configs -= ["optimize_max"]
also re
Dirk Pranke
2016/05/31 19:46:18
Yes, I think so.
|
| + if (!is_nacl_irt) { |
| + if (!is_win) { |
| cflags = [ "-O2" ] + common_optimize_on_cflags |
| } |
| } |
| } |
| +# Some components like v8 use higher optimization levels on linux and mac. |
| +config("optimize_component") { |
|
Michael Achenbach
2016/05/30 11:38:07
Named this optimize_component as I don't like opti
|
| + configs = [ ":common_optimize_max" ] |
| + if (!is_nacl_irt) { |
| + if (!is_win) { |
| + cflags = [ "-O3" ] + common_optimize_on_cflags |
| + } |
| + } |
| +} |
| + |
| # The default optimization applied to all targets. This will be equivalent to |
| # either "optimize" or "no_optimize", depending on the build flags. |
| config("default_optimization") { |