Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: build/config/compiler/BUILD.gn

Issue 2285723002: Use DWARF 3 on android, instead of DWARF 4. (Closed)
Patch Set: Restrict to just android, and fix arg order Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1518 if (is_mac || is_ios) { 1518 if (is_mac || is_ios) {
1519 cflags = [ "-gdwarf-2" ] 1519 cflags = [ "-gdwarf-2" ]
1520 if (is_mac && enable_dsyms) { 1520 if (is_mac && enable_dsyms) {
1521 # If generating dSYMs, specify -fno-standalone-debug. This was 1521 # If generating dSYMs, specify -fno-standalone-debug. This was
1522 # originally specified for https://crbug.com/479841 because dsymutil 1522 # originally specified for https://crbug.com/479841 because dsymutil
1523 # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to 1523 # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to
1524 # version 7 also produces debug data that is incompatible with Breakpad 1524 # version 7 also produces debug data that is incompatible with Breakpad
1525 # dump_syms, so this is still required (https://crbug.com/622406). 1525 # dump_syms, so this is still required (https://crbug.com/622406).
1526 cflags += [ "-fno-standalone-debug" ] 1526 cflags += [ "-fno-standalone-debug" ]
1527 } 1527 }
1528 } else if (is_android) {
1529 # Breakpad can't handle DWARF 4 symbols properly yet, so use DWARF 3
1530 # explicitly on android where we are hitting https://crbug.com/638485.
1531 # The arguments MUST be in this order because of a gcc arg parsing bug.
1532 cflags = [
1533 "-gdwarf-3",
1534 "-g2",
1535 ]
1528 } else { 1536 } else {
1529 cflags = [ "-g2" ] 1537 cflags = [ "-g2" ]
1530 } 1538 }
1531 if (use_debug_fission) { 1539 if (use_debug_fission) {
1532 cflags += [ "-gsplit-dwarf" ] 1540 cflags += [ "-gsplit-dwarf" ]
1533 } 1541 }
1534 asmflags = cflags 1542 asmflags = cflags
1535 ldflags = [] 1543 ldflags = []
1536 } 1544 }
1537 } 1545 }
1538 1546
1539 # Minimal symbols. 1547 # Minimal symbols.
1540 config("minimal_symbols") { 1548 config("minimal_symbols") {
1541 if (is_win) { 1549 if (is_win) {
1542 # Linker symbols for backtraces only. 1550 # Linker symbols for backtraces only.
1543 cflags = [] 1551 cflags = []
1544 if (is_win_fastlink && visual_studio_version != "2013") { 1552 if (is_win_fastlink && visual_studio_version != "2013") {
1545 # Tell VS 2015+ to create a PDB that references debug 1553 # Tell VS 2015+ to create a PDB that references debug
1546 # information in .obj and .lib files instead of copying 1554 # information in .obj and .lib files instead of copying
1547 # it all. This flag is incompatible with /PROFILE 1555 # it all. This flag is incompatible with /PROFILE
1548 ldflags = [ "/DEBUG:FASTLINK" ] 1556 ldflags = [ "/DEBUG:FASTLINK" ]
1549 } else { 1557 } else {
1550 ldflags = [ "/DEBUG" ] 1558 ldflags = [ "/DEBUG" ]
1551 } 1559 }
1552 } else { 1560 } else {
1553 cflags = [ "-g1" ] 1561 if (is_android) {
1562 # Breakpad can't handle DWARF 4 symbols properly yet, so use DWARF 3
1563 # explicitly on android where we are hitting https://crbug.com/638485.
1564 # The arguments MUST be in this order because of a gcc arg parsing bug.
1565 cflags = [
1566 "-gdwarf-3",
1567 "-g1",
1568 ]
1569 } else {
1570 cflags = [ "-g1" ]
1571 }
1554 if (use_debug_fission) { 1572 if (use_debug_fission) {
1555 cflags += [ "-gsplit-dwarf" ] 1573 cflags += [ "-gsplit-dwarf" ]
1556 } 1574 }
1557 asmflags = cflags 1575 asmflags = cflags
1558 ldflags = [] 1576 ldflags = []
1559 } 1577 }
1560 } 1578 }
1561 1579
1562 # No symbols. 1580 # No symbols.
1563 config("no_symbols") { 1581 config("no_symbols") {
(...skipping 18 matching lines...) Expand all
1582 1600
1583 if (is_ios || is_mac) { 1601 if (is_ios || is_mac) {
1584 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1602 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1585 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1603 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1586 config("enable_arc") { 1604 config("enable_arc") {
1587 common_flags = [ "-fobjc-arc" ] 1605 common_flags = [ "-fobjc-arc" ]
1588 cflags_objc = common_flags 1606 cflags_objc = common_flags
1589 cflags_objcc = common_flags 1607 cflags_objcc = common_flags
1590 } 1608 }
1591 } 1609 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698