Chromium Code Reviews| Index: build/config/compiler/BUILD.gn |
| diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
| index db0e6f0ef30569d62d0759b1f6f80af5a22f36e0..10fe23200b8e0493554c2b29bece450f5ba79834 100644 |
| --- a/build/config/compiler/BUILD.gn |
| +++ b/build/config/compiler/BUILD.gn |
| @@ -86,6 +86,10 @@ declare_args() { |
| # builds. To use it, set auto_profile_path to the path to a file containing |
| # the needed gcov profiling data. |
| auto_profile_path = "" |
| + |
| + # Optimize for coverage guided fuzzing (balance between speed and number of |
| + # branches) |
| + optimize_for_fuzzing = false |
| } |
| if (is_clang && !is_nacl) { |
| @@ -1461,6 +1465,11 @@ config("optimize_speed") { |
| } |
| } |
| +config("optimize_fuzzing") { |
| + 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") { |
| @@ -1470,6 +1479,9 @@ config("default_optimization") { |
| configs = [ "//build/config/nacl:irt_optimize" ] |
| } else if (is_debug) { |
| configs = [ ":no_optimize" ] |
| + } else if (optimize_for_fuzzing) { |
| + assert(!is_win, "Fuzzing optimize level not supported on Windows") |
|
Dirk Pranke
2016/10/05 16:45:38
One advantage to the prior version is that the ass
|
| + configs = [ ":optimize_fuzzing" ] |
| } else { |
| configs = [ ":optimize" ] |
| } |