Commit eb5fc54d authored by Nico Weber's avatar Nico Weber

Disable symbols for nacl-compiler-built object files.

The non-pnacl gcc-based nacl compilers embed absolute paths in their debug info.
This is bad for goma usage and build determinism.  Since I've never
seen a stack in nacl-built code and neither the code nor the toolchain
are changing much anymore, just disable symbols for nacl-built code.
(The same code when built with a non-gcc nacl toolchain of course still
has symbols, including the nacl-clang-built IRT where we archive the symbols for
production builds.)

Bug: 899438,906741,429358
Change-Id: I3062a26f25281759cc240f1967ab670f28e562a6
Reviewed-on: https://chromium-review.googlesource.com/c/1351492Reviewed-by: default avatarTakuto Ikuta <tikuta@chromium.org>
Reviewed-by: default avatarDerek Schuff <dschuff@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610998}
parent 8009e9e5
......@@ -2257,7 +2257,16 @@ config("symbols") {
# [1] crrev.com/a81d5ade0b043208e06ad71a38bcf9c348a1a52f
cflags += [ "-gdwarf-3" ]
}
cflags += [ "-g2" ]
# The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
# elsewhere in this file), so they can't have build-dir-independent output.
# Disable symbols for nacl object files to get deterministic,
# build-directory-independent output. pnacl and nacl-clang do support that
# flag, so we can use use -g1 for pnacl and nacl-clang compiles.
# gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang.
if (!is_nacl || is_clang) {
cflags += [ "-g2" ]
}
}
if (use_debug_fission && !is_nacl && !is_android) {
# NOTE: Some Chrome OS builds globally set |use_debug_fission| to true,
......@@ -2317,7 +2326,16 @@ config("minimal_symbols") {
# TODO(thakis): Remove this again once dump_syms is fixed.
cflags += [ "-gdwarf-3" ]
}
cflags += [ "-g1" ]
# The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
# elsewhere in this file), so they can't have build-dir-independent output.
# Disable symbols for nacl object files to get deterministic,
# build-directory-independent output. pnacl and nacl-clang do support that
# flag, so we can use use -g1 for pnacl and nacl-clang compiles.
# gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang.
if (!is_nacl || is_clang) {
cflags += [ "-g1" ]
}
ldflags = []
if (is_android && is_clang) {
# Android defaults to symbol_level=1 builds in production builds
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment