Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index 5fcc050b1741aacfeebd2a964c30ec32f1460e4b..04b768a670b75aae2af76297844bbe75dacd868e 100644 |
--- a/build/config/compiler/BUILD.gn |
+++ b/build/config/compiler/BUILD.gn |
@@ -1463,6 +1463,25 @@ config("optimize_speed") { |
} |
} |
+config("optimize_fuzzing") { |
+ if (is_nacl_irt) { |
+ # The NaCl IRT is a special case and always wants its own config. |
+ # Various components do: |
+ # if (!is_debug) { |
+ # configs -= [ "//build/config/compiler:default_optimization" ] |
+ # configs += [ "//build/config/compiler:optimize_max" ] |
+ # } |
+ # So this config has to have the selection logic just like |
+ # "default_optimization", below. |
+ configs = [ "//build/config/nacl:irt_optimize" ] |
+ } else { |
+ # Only supported on non-Windows. |
+ assert(!is_win) |
Dirk Pranke
2016/10/03 20:37:13
I would:
- get rid of lines 1467-1477 since they
Oliver Chang
2016/10/03 20:54:24
Done.
|
+ cflags = [ "-O1" ] + common_optimize_on_cflags |
+ ldflags = common_optimize_on_ldflags |
+ } |
+} |
+ |
# 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") { |
@@ -1472,6 +1491,8 @@ config("default_optimization") { |
configs = [ "//build/config/nacl:irt_optimize" ] |
} else if (is_debug) { |
configs = [ ":no_optimize" ] |
+ } else if (!is_win && optimize_for_fuzzing) { |
+ configs = [ ":optimize_fuzzing" ] |
Dirk Pranke
2016/10/03 20:37:13
I would get rid of the (!is_win) check here, as pe
Oliver Chang
2016/10/03 20:54:25
Done.
|
} else { |
configs = [ ":optimize" ] |
} |