| 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") | 9 import("//build/toolchain/cc_wrapper.gni") |
| 10 import("//build/toolchain/toolchain.gni") | 10 import("//build/toolchain/toolchain.gni") |
| (...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1717 if (is_mac || is_ios) { | 1717 if (is_mac || is_ios) { |
| 1718 cflags = [ "-gdwarf-2" ] | 1718 cflags = [ "-gdwarf-2" ] |
| 1719 if (is_mac && enable_dsyms) { | 1719 if (is_mac && enable_dsyms) { |
| 1720 # If generating dSYMs, specify -fno-standalone-debug. This was | 1720 # If generating dSYMs, specify -fno-standalone-debug. This was |
| 1721 # originally specified for https://crbug.com/479841 because dsymutil | 1721 # originally specified for https://crbug.com/479841 because dsymutil |
| 1722 # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to | 1722 # 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 | 1723 # version 7 also produces debug data that is incompatible with Breakpad |
| 1724 # dump_syms, so this is still required (https://crbug.com/622406). | 1724 # dump_syms, so this is still required (https://crbug.com/622406). |
| 1725 cflags += [ "-fno-standalone-debug" ] | 1725 cflags += [ "-fno-standalone-debug" ] |
| 1726 } | 1726 } |
| 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 { | 1727 } else { |
| 1736 cflags = [ "-g2" ] | 1728 cflags = [ "-g2" ] |
| 1737 } | 1729 } |
| 1738 if (use_debug_fission) { | 1730 if (use_debug_fission) { |
| 1739 cflags += [ "-gsplit-dwarf" ] | 1731 cflags += [ "-gsplit-dwarf" ] |
| 1740 } | 1732 } |
| 1741 asmflags = cflags | 1733 asmflags = cflags |
| 1742 ldflags = [] | 1734 ldflags = [] |
| 1743 | 1735 |
| 1744 # TODO(thakis): Figure out if there's a way to make this go for 32-bit, | 1736 # TODO(thakis): Figure out if there's a way to make this go for 32-bit, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1758 } | 1750 } |
| 1759 } | 1751 } |
| 1760 | 1752 |
| 1761 # Minimal symbols. | 1753 # Minimal symbols. |
| 1762 config("minimal_symbols") { | 1754 config("minimal_symbols") { |
| 1763 if (is_win) { | 1755 if (is_win) { |
| 1764 # Linker symbols for backtraces only. | 1756 # Linker symbols for backtraces only. |
| 1765 cflags = [] | 1757 cflags = [] |
| 1766 ldflags = [ "/DEBUG" ] | 1758 ldflags = [ "/DEBUG" ] |
| 1767 } else { | 1759 } else { |
| 1760 cflags = [ "-g1" ] |
| 1768 if (is_android) { | 1761 if (is_android) { |
| 1769 # Breakpad can't handle DWARF 4 symbols properly yet, so use DWARF 3 | 1762 # Android defaults to symbol_level=1 builds in production builds |
| 1770 # explicitly on android where we are hitting https://crbug.com/638485. | 1763 # (https://crbug.com/648948), but clang, unlike gcc, doesn't emit |
| 1771 # The arguments MUST be in this order because of a gcc arg parsing bug. | 1764 # DW_AT_linkage_name in -g1 builds. -fdebug-info-for-profiling enables |
| 1772 cflags = [ | 1765 # that (and a bunch of other things we don't need), so that we get |
| 1773 "-gdwarf-3", | 1766 # qualified names in stacks. |
| 1774 "-g1", | 1767 # TODO(thakis): Consider making clang emit DW_AT_linkage_name in -g1 mode; |
| 1775 ] | 1768 # failing that consider doing this on non-Android too. |
| 1776 } else { | 1769 cflags += [ "-fdebug-info-for-profiling" ] |
| 1777 cflags = [ "-g1" ] | |
| 1778 } | 1770 } |
| 1779 | 1771 |
| 1780 # Note: -gsplit-dwarf implicitly turns on -g2 with clang, so don't pass it. | 1772 # Note: -gsplit-dwarf implicitly turns on -g2 with clang, so don't pass it. |
| 1781 asmflags = cflags | 1773 asmflags = cflags |
| 1782 ldflags = [] | 1774 ldflags = [] |
| 1783 } | 1775 } |
| 1784 } | 1776 } |
| 1785 | 1777 |
| 1786 # No symbols. | 1778 # No symbols. |
| 1787 config("no_symbols") { | 1779 config("no_symbols") { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1806 | 1798 |
| 1807 if (is_ios || is_mac) { | 1799 if (is_ios || is_mac) { |
| 1808 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1800 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
| 1809 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1801 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
| 1810 config("enable_arc") { | 1802 config("enable_arc") { |
| 1811 common_flags = [ "-fobjc-arc" ] | 1803 common_flags = [ "-fobjc-arc" ] |
| 1812 cflags_objc = common_flags | 1804 cflags_objc = common_flags |
| 1813 cflags_objcc = common_flags | 1805 cflags_objcc = common_flags |
| 1814 } | 1806 } |
| 1815 } | 1807 } |
| OLD | NEW |