Skip to content

Commit

Permalink
gn: declare use_debug_fission and use_gold as a build arguments
Browse files Browse the repository at this point in the history
BUG=448159

Review URL: https://codereview.chromium.org/813363008

Cr-Commit-Position: refs/heads/master@{#311234}
  • Loading branch information
mostynb authored and Commit bot committed Jan 13, 2015
1 parent 8501023 commit cb33eb2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,18 @@ declare_args() {
# information to analyze.
# Requires profiling to be set to true.
enable_full_stack_frames_for_profiling = false
}

use_gold = is_linux && cpu_arch == "x64"
# Use gold for linking on 64-bit Linux only (on 32-bit it runs out of
# address space, and it doesn't support cross-compiling).
use_gold = is_linux && cpu_arch == "x64"

if (!is_win) {
# linux_use_debug_fission: whether to use split DWARF debug info
# use_debug_fission: whether to use split DWARF debug info
# files. This can reduce link time significantly, but is incompatible
# with some utilities such as icecc and ccache. Requires gold and
# gcc >= 4.8 or clang.
# http://gcc.gnu.org/wiki/DebugFission
use_debug_fission = use_gold && linux_use_bundled_binutils && !use_ccache
use_debug_fission =
!is_win && use_gold && linux_use_bundled_binutils && !use_ccache
}

# default_include_dirs ---------------------------------------------------------
Expand Down Expand Up @@ -310,8 +311,6 @@ config("compiler") {
ldflags += [ "-pthread" ]
}
if (use_gold) {
# Use gold for linking on 64-bit Linux only (on 32-bit it runs out of
# address space, and it doesn't support cross-compiling).
gold_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin",
root_build_dir)
ldflags += [
Expand Down

0 comments on commit cb33eb2

Please sign in to comment.