| 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") |
| 11 | 11 |
| 12 if (current_cpu == "arm" || current_cpu == "arm64") { | 12 if (current_cpu == "arm" || current_cpu == "arm64") { |
| 13 import("//build/config/arm.gni") | 13 import("//build/config/arm.gni") |
| 14 } | 14 } |
| 15 if (current_cpu == "mipsel" || current_cpu == "mips64el") { | 15 if (current_cpu == "mipsel" || current_cpu == "mips64el") { |
| 16 import("//build/config/mips.gni") | 16 import("//build/config/mips.gni") |
| 17 } | 17 } |
| 18 if (is_win) { | 18 if (is_win) { |
| 19 import("//build/config/win/visual_studio_version.gni") | 19 import("//build/config/win/visual_studio_version.gni") |
| 20 } | 20 } |
| 21 if (is_mac) { |
| 22 import("//build/config/mac/symbols.gni") |
| 23 } |
| 21 | 24 |
| 22 declare_args() { | 25 declare_args() { |
| 23 # Default to warnings as errors for default workflow, where we catch | 26 # Default to warnings as errors for default workflow, where we catch |
| 24 # warnings with known toolchains. Allow overriding this e.g. for Chromium | 27 # warnings with known toolchains. Allow overriding this e.g. for Chromium |
| 25 # builds on Linux that could use a different version of the compiler. | 28 # builds on Linux that could use a different version of the compiler. |
| 26 # With GCC, warnings in no-Chromium code are always not treated as errors. | 29 # With GCC, warnings in no-Chromium code are always not treated as errors. |
| 27 treat_warnings_as_errors = true | 30 treat_warnings_as_errors = true |
| 28 | 31 |
| 29 # Normally, Android builds are lightly optimized, even for debug builds, to | 32 # Normally, Android builds are lightly optimized, even for debug builds, to |
| 30 # keep binary size down. Setting this flag to true disables such optimization | 33 # keep binary size down. Setting this flag to true disables such optimization |
| (...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1480 # Tell VS 2015+ to create a PDB that references debug | 1483 # Tell VS 2015+ to create a PDB that references debug |
| 1481 # information in .obj and .lib files instead of copying | 1484 # information in .obj and .lib files instead of copying |
| 1482 # it all. This flag is incompatible with /PROFILE | 1485 # it all. This flag is incompatible with /PROFILE |
| 1483 ldflags = [ "/DEBUG:FASTLINK" ] | 1486 ldflags = [ "/DEBUG:FASTLINK" ] |
| 1484 } else { | 1487 } else { |
| 1485 ldflags = [ "/DEBUG" ] | 1488 ldflags = [ "/DEBUG" ] |
| 1486 } | 1489 } |
| 1487 } else { | 1490 } else { |
| 1488 if (is_mac || is_ios) { | 1491 if (is_mac || is_ios) { |
| 1489 cflags = [ "-gdwarf-2" ] | 1492 cflags = [ "-gdwarf-2" ] |
| 1493 if (is_mac && enable_dsyms) { |
| 1494 # If generating dSYMs, specify -fno-standalone-debug. This was |
| 1495 # originally specified for https://crbug.com/479841 because dsymutil |
| 1496 # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to |
| 1497 # version 7 also produces debug data that is incompatible with Breakpad |
| 1498 # dump_syms, so this is still required (https://crbug.com/622406). |
| 1499 cflags += [ "-fno-standalone-debug" ] |
| 1500 } |
| 1490 } else { | 1501 } else { |
| 1491 cflags = [ "-g2" ] | 1502 cflags = [ "-g2" ] |
| 1492 } | 1503 } |
| 1493 if (use_debug_fission) { | 1504 if (use_debug_fission) { |
| 1494 cflags += [ "-gsplit-dwarf" ] | 1505 cflags += [ "-gsplit-dwarf" ] |
| 1495 } | 1506 } |
| 1496 asmflags = cflags | 1507 asmflags = cflags |
| 1497 ldflags = [] | 1508 ldflags = [] |
| 1498 } | 1509 } |
| 1499 } | 1510 } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1544 | 1555 |
| 1545 if (is_ios || is_mac) { | 1556 if (is_ios || is_mac) { |
| 1546 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1557 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
| 1547 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1558 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
| 1548 config("enable_arc") { | 1559 config("enable_arc") { |
| 1549 common_flags = [ "-fobjc-arc" ] | 1560 common_flags = [ "-fobjc-arc" ] |
| 1550 cflags_objc = common_flags | 1561 cflags_objc = common_flags |
| 1551 cflags_objcc = common_flags | 1562 cflags_objcc = common_flags |
| 1552 } | 1563 } |
| 1553 } | 1564 } |
| OLD | NEW |