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 27 matching lines...) Expand all Loading... | |
38 binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", | 38 binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", |
39 root_build_dir) | 39 root_build_dir) |
40 | 40 |
41 # Compile in such a way as to make it possible for the profiler to unwind full | 41 # Compile in such a way as to make it possible for the profiler to unwind full |
42 # stack frames. Setting this flag has a large effect on the performance of the | 42 # stack frames. Setting this flag has a large effect on the performance of the |
43 # generated code than just setting profiling, but gives the profiler more | 43 # generated code than just setting profiling, but gives the profiler more |
44 # information to analyze. | 44 # information to analyze. |
45 # Requires profiling to be set to true. | 45 # Requires profiling to be set to true. |
46 enable_full_stack_frames_for_profiling = false | 46 enable_full_stack_frames_for_profiling = false |
47 | 47 |
48 # TODO(GYP): We should be using 64-bit gold for linking on both 64-bit Linux | 48 # TODO: We should be using 64-bit gold for linking on both 64-bit Linux |
49 # and 32-bit linux; 32-bit Gold runs out of address-space on 32-bit builds. | 49 # and 32-bit linux; 32-bit Gold runs out of address-space on 32-bit builds. |
50 # However, something isn't quite working right on the 32-bit builds. | 50 # However, something isn't quite working right on the 32-bit builds. |
51 use_gold = | 51 use_gold = |
52 is_linux && (current_cpu == "x64" || current_cpu == "arm") && !use_lld | 52 is_linux && (current_cpu == "x64" || current_cpu == "arm") && !use_lld |
53 | 53 |
54 # When we are going to use gold we need to find it. | 54 # When we are going to use gold we need to find it. |
55 # This is initialized below, after use_gold might have been overridden. | 55 # This is initialized below, after use_gold might have been overridden. |
56 gold_path = false | 56 gold_path = false |
57 | 57 |
58 # use_debug_fission: whether to use split DWARF debug info | 58 # use_debug_fission: whether to use split DWARF debug info |
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1328 configs = [ "//build/config/nacl:irt_optimize" ] | 1328 configs = [ "//build/config/nacl:irt_optimize" ] |
1329 } else { | 1329 } else { |
1330 ldflags = common_optimize_on_ldflags | 1330 ldflags = common_optimize_on_ldflags |
1331 if (is_win) { | 1331 if (is_win) { |
1332 # Favor speed over size, /O2 must be before the common flags. The GYP | 1332 # Favor speed over size, /O2 must be before the common flags. The GYP |
1333 # build also specifies /Ot, /Oi, and /GF, but these are implied by /O2. | 1333 # build also specifies /Ot, /Oi, and /GF, but these are implied by /O2. |
1334 cflags = [ "/O2" ] + common_optimize_on_cflags | 1334 cflags = [ "/O2" ] + common_optimize_on_cflags |
1335 | 1335 |
1336 # TODO(thakis): Remove is_clang here, https://crbug.com/598772 | 1336 # TODO(thakis): Remove is_clang here, https://crbug.com/598772 |
1337 if (is_official_build && !is_clang) { | 1337 if (is_official_build && !is_clang) { |
1338 # TODO(GYP): TODO(dpranke): Should these only be on in an official | |
brettw
2016/05/04 19:51:28
I think we should do WPO only in official.
| |
1339 # build, or on all the time? For now we'll require official build so | |
1340 # that the compile is clean. | |
1341 cflags += [ | 1338 cflags += [ |
1342 "/GL", # Whole program optimization. | 1339 "/GL", # Whole program optimization. |
1343 | 1340 |
1344 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds. | 1341 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds. |
1345 # Probably anything that this would catch that wouldn't be caught in a | 1342 # Probably anything that this would catch that wouldn't be caught in a |
1346 # normal build isn't going to actually be a bug, so the incremental | 1343 # normal build isn't going to actually be a bug, so the incremental |
1347 # value of C4702 for PGO builds is likely very small. | 1344 # value of C4702 for PGO builds is likely very small. |
1348 "/wd4702", | 1345 "/wd4702", |
1349 ] | 1346 ] |
1350 } | 1347 } |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1456 | 1453 |
1457 if (is_ios || is_mac) { | 1454 if (is_ios || is_mac) { |
1458 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1455 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1459 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1456 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1460 config("enable_arc") { | 1457 config("enable_arc") { |
1461 common_flags = [ "-fobjc-arc" ] | 1458 common_flags = [ "-fobjc-arc" ] |
1462 cflags_objc = common_flags | 1459 cflags_objc = common_flags |
1463 cflags_objcc = common_flags | 1460 cflags_objcc = common_flags |
1464 } | 1461 } |
1465 } | 1462 } |
OLD | NEW |