| 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/chromecast_build.gni") | 7 import("//build/config/chromecast_build.gni") |
| 8 import("//build/config/compiler/compiler.gni") | 8 import("//build/config/compiler/compiler.gni") |
| 9 import("//build/toolchain/cc_wrapper.gni") | |
| 10 import("//build/toolchain/toolchain.gni") | 9 import("//build/toolchain/toolchain.gni") |
| 11 import("//build_overrides/build.gni") | 10 import("//build_overrides/build.gni") |
| 12 | 11 |
| 13 if (current_cpu == "arm" || current_cpu == "arm64") { | 12 if (current_cpu == "arm" || current_cpu == "arm64") { |
| 14 import("//build/config/arm.gni") | 13 import("//build/config/arm.gni") |
| 15 } | 14 } |
| 16 if (current_cpu == "mipsel" || current_cpu == "mips64el" || | 15 if (current_cpu == "mipsel" || current_cpu == "mips64el" || |
| 17 current_cpu == "mips" || current_cpu == "mips64") { | 16 current_cpu == "mips" || current_cpu == "mips64") { |
| 18 import("//build/config/mips.gni") | 17 import("//build/config/mips.gni") |
| 19 } | 18 } |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 # Apply the default logic for these values if they were not set explicitly. | 117 # Apply the default logic for these values if they were not set explicitly. |
| 119 if (gold_path == false) { | 118 if (gold_path == false) { |
| 120 if (use_gold) { | 119 if (use_gold) { |
| 121 gold_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", | 120 gold_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", |
| 122 root_build_dir) | 121 root_build_dir) |
| 123 } else { | 122 } else { |
| 124 gold_path = "" | 123 gold_path = "" |
| 125 } | 124 } |
| 126 } | 125 } |
| 127 | 126 |
| 128 if (use_debug_fission == "default") { | |
| 129 use_debug_fission = | |
| 130 is_debug && !is_android && !is_win && use_gold && cc_wrapper == "" | |
| 131 } | |
| 132 | |
| 133 # default_include_dirs --------------------------------------------------------- | 127 # default_include_dirs --------------------------------------------------------- |
| 134 # | 128 # |
| 135 # This is a separate config so that third_party code (which would not use the | 129 # This is a separate config so that third_party code (which would not use the |
| 136 # source root and might have conflicting versions of some headers) can remove | 130 # source root and might have conflicting versions of some headers) can remove |
| 137 # this and specify their own include paths. | 131 # this and specify their own include paths. |
| 138 config("default_include_dirs") { | 132 config("default_include_dirs") { |
| 139 include_dirs = [ | 133 include_dirs = [ |
| 140 "//", | 134 "//", |
| 141 root_gen_dir, | 135 root_gen_dir, |
| 142 ] | 136 ] |
| (...skipping 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1717 if (is_mac || is_ios) { | 1711 if (is_mac || is_ios) { |
| 1718 cflags = [ "-gdwarf-2" ] | 1712 cflags = [ "-gdwarf-2" ] |
| 1719 if (is_mac && enable_dsyms) { | 1713 if (is_mac && enable_dsyms) { |
| 1720 # If generating dSYMs, specify -fno-standalone-debug. This was | 1714 # If generating dSYMs, specify -fno-standalone-debug. This was |
| 1721 # originally specified for https://crbug.com/479841 because dsymutil | 1715 # originally specified for https://crbug.com/479841 because dsymutil |
| 1722 # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to | 1716 # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to |
| 1723 # version 7 also produces debug data that is incompatible with Breakpad | 1717 # version 7 also produces debug data that is incompatible with Breakpad |
| 1724 # dump_syms, so this is still required (https://crbug.com/622406). | 1718 # dump_syms, so this is still required (https://crbug.com/622406). |
| 1725 cflags += [ "-fno-standalone-debug" ] | 1719 cflags += [ "-fno-standalone-debug" ] |
| 1726 } | 1720 } |
| 1727 } else if (is_android) { | |
| 1728 # Breakpad can't handle DWARF 4 symbols properly yet, so use DWARF 3 | |
| 1729 # explicitly on android where we are hitting https://crbug.com/638485. | |
| 1730 # The arguments MUST be in this order because of a gcc arg parsing bug. | |
| 1731 cflags = [ | |
| 1732 "-gdwarf-3", | |
| 1733 "-g2", | |
| 1734 ] | |
| 1735 } else { | 1721 } else { |
| 1736 cflags = [ "-g2" ] | 1722 cflags = [ "-g2" ] |
| 1737 } | 1723 } |
| 1738 if (use_debug_fission) { | 1724 if (use_debug_fission) { |
| 1739 cflags += [ "-gsplit-dwarf" ] | 1725 cflags += [ "-gsplit-dwarf" ] |
| 1740 } | 1726 } |
| 1741 asmflags = cflags | 1727 asmflags = cflags |
| 1742 ldflags = [] | 1728 ldflags = [] |
| 1743 | 1729 |
| 1744 # TODO(thakis): Figure out if there's a way to make this go for 32-bit, | 1730 # TODO(thakis): Figure out if there's a way to make this go for 32-bit, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1758 } | 1744 } |
| 1759 } | 1745 } |
| 1760 | 1746 |
| 1761 # Minimal symbols. | 1747 # Minimal symbols. |
| 1762 config("minimal_symbols") { | 1748 config("minimal_symbols") { |
| 1763 if (is_win) { | 1749 if (is_win) { |
| 1764 # Linker symbols for backtraces only. | 1750 # Linker symbols for backtraces only. |
| 1765 cflags = [] | 1751 cflags = [] |
| 1766 ldflags = [ "/DEBUG" ] | 1752 ldflags = [ "/DEBUG" ] |
| 1767 } else { | 1753 } else { |
| 1768 if (is_android) { | 1754 cflags = [ "-g1" ] |
| 1769 # Breakpad can't handle DWARF 4 symbols properly yet, so use DWARF 3 | |
| 1770 # explicitly on android where we are hitting https://crbug.com/638485. | |
| 1771 # The arguments MUST be in this order because of a gcc arg parsing bug. | |
| 1772 cflags = [ | |
| 1773 "-gdwarf-3", | |
| 1774 "-g1", | |
| 1775 ] | |
| 1776 } else { | |
| 1777 cflags = [ "-g1" ] | |
| 1778 } | |
| 1779 | 1755 |
| 1780 # Note: -gsplit-dwarf implicitly turns on -g2 with clang, so don't pass it. | 1756 # Note: -gsplit-dwarf implicitly turns on -g2 with clang, so don't pass it. |
| 1781 asmflags = cflags | 1757 asmflags = cflags |
| 1782 ldflags = [] | 1758 ldflags = [] |
| 1783 } | 1759 } |
| 1784 } | 1760 } |
| 1785 | 1761 |
| 1786 # No symbols. | 1762 # No symbols. |
| 1787 config("no_symbols") { | 1763 config("no_symbols") { |
| 1788 if (!is_win) { | 1764 if (!is_win) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1806 | 1782 |
| 1807 if (is_ios || is_mac) { | 1783 if (is_ios || is_mac) { |
| 1808 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1784 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
| 1809 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1785 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
| 1810 config("enable_arc") { | 1786 config("enable_arc") { |
| 1811 common_flags = [ "-fobjc-arc" ] | 1787 common_flags = [ "-fobjc-arc" ] |
| 1812 cflags_objc = common_flags | 1788 cflags_objc = common_flags |
| 1813 cflags_objcc = common_flags | 1789 cflags_objcc = common_flags |
| 1814 } | 1790 } |
| 1815 } | 1791 } |
| OLD | NEW |