| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
| 6 import("//build/config/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
| 7 import("//build/config/compiler/compiler.gni") | 7 import("//build/config/compiler/compiler.gni") |
| 8 import("//build/config/nacl/config.gni") | 8 import("//build/config/nacl/config.gni") |
| 9 import("//build/toolchain/cc_wrapper.gni") | 9 import("//build/toolchain/cc_wrapper.gni") |
| 10 import("//build/toolchain/toolchain.gni") | 10 import("//build/toolchain/toolchain.gni") |
| (...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1402 "/GL", # Whole program optimization. | 1402 "/GL", # Whole program optimization. |
| 1403 | 1403 |
| 1404 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds. | 1404 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds. |
| 1405 # Probably anything that this would catch that wouldn't be caught in a | 1405 # Probably anything that this would catch that wouldn't be caught in a |
| 1406 # normal build isn't going to actually be a bug, so the incremental | 1406 # normal build isn't going to actually be a bug, so the incremental |
| 1407 # value of C4702 for PGO builds is likely very small. | 1407 # value of C4702 for PGO builds is likely very small. |
| 1408 "/wd4702", | 1408 "/wd4702", |
| 1409 ] | 1409 ] |
| 1410 } | 1410 } |
| 1411 } else { | 1411 } else { |
| 1412 cflags = [ "-O2" ] + common_optimize_on_cflags | 1412 if (optimize_for_size) { |
| 1413 cflags = [ "-Os" ] + common_optimize_on_cflags |
| 1414 } else { |
| 1415 cflags = [ "-O2" ] + common_optimize_on_cflags |
| 1416 } |
| 1413 } | 1417 } |
| 1414 } | 1418 } |
| 1415 } | 1419 } |
| 1416 | 1420 |
| 1417 # This config can be used to override the default settings for per-component | 1421 # This config can be used to override the default settings for per-component |
| 1418 # and whole-program optimization, optimizing the particular target for speed | 1422 # and whole-program optimization, optimizing the particular target for speed |
| 1419 # instead of code size. This config is exactly the same as "optimize_max" | 1423 # instead of code size. This config is exactly the same as "optimize_max" |
| 1420 # except that we use -O3 instead of -O2 on non-win, non-IRT platforms. | 1424 # except that we use -O3 instead of -O2 on non-win, non-IRT platforms. |
| 1421 # | 1425 # |
| 1422 # TODO(crbug.com/621335) - rework how all of these configs are related | 1426 # TODO(crbug.com/621335) - rework how all of these configs are related |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1567 | 1571 |
| 1568 if (is_ios || is_mac) { | 1572 if (is_ios || is_mac) { |
| 1569 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1573 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
| 1570 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1574 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
| 1571 config("enable_arc") { | 1575 config("enable_arc") { |
| 1572 common_flags = [ "-fobjc-arc" ] | 1576 common_flags = [ "-fobjc-arc" ] |
| 1573 cflags_objc = common_flags | 1577 cflags_objc = common_flags |
| 1574 cflags_objcc = common_flags | 1578 cflags_objcc = common_flags |
| 1575 } | 1579 } |
| 1576 } | 1580 } |
| OLD | NEW |