Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: toolchain.gypi and node_gyp.py cleanup #34268

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions tools/gyp_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,6 @@ def run_gyp(args):
args.append('-Dcomponent=static_library')
args.append('-Dlibrary=static_library')

# Don't compile with -B and -fuse-ld=, we don't bundle ld.gold. Can't be
# set in common.gypi due to how deps/v8/build/toolchain.gypi uses them.
args.append('-Dlinux_use_bundled_binutils=0')
args.append('-Dlinux_use_bundled_gold=0')
args.append('-Dlinux_use_gold_flags=0')

# Set the current program to this module. This is done because gyp
# will use the program path in targets it generates. If this script was called
# by another script the program name will not be gyp_node.py but whatever
# the name of the script that called it is, leading to incorrect commands
# in generated targets (for example cmd_regen_makefile).
sys.argv[0] = os.path.abspath(__file__)
rc = gyp.main(args)
if rc != 0:
print('Error running GYP')
Expand Down
63 changes: 0 additions & 63 deletions tools/v8_gypfiles/toolchain.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -99,34 +99,6 @@
['OS=="linux" and host_arch=="ia32"', {
'binutils_dir%': 'third_party/binutils/Linux_ia32/Release/bin',
}],

# linux_use_bundled_gold: whether to use the gold linker binary checked
# into third_party/binutils. Force this off via GYP_DEFINES when you
# are using a custom toolchain and need to control -B in ldflags.
# Do not use 32-bit gold on 32-bit hosts as it runs out address space
# for component=static_library builds.
['((OS=="linux" or OS=="android") and (target_arch=="x64" or target_arch=="arm" or (target_arch=="ia32" and host_arch=="x64"))) or (OS=="linux" and target_arch=="mipsel")', {
'linux_use_bundled_gold%': 1,
}, {
'linux_use_bundled_gold%': 0,
}],
# linux_use_bundled_binutils: whether to use the binary binutils
# checked into third_party/binutils. These are not multi-arch so cannot
# be used except on x86 and x86-64 (the only two architectures which
# are currently checke in). Force this off via GYP_DEFINES when you
# are using a custom toolchain and need to control -B in cflags.
['OS=="linux" and (target_arch=="ia32" or target_arch=="x64")', {
'linux_use_bundled_binutils%': 1,
}, {
'linux_use_bundled_binutils%': 0,
}],
# linux_use_gold_flags: whether to use build flags that rely on gold.
# On by default for x64 Linux.
['OS=="linux" and target_arch=="x64"', {
'linux_use_gold_flags%': 1,
}, {
'linux_use_gold_flags%': 0,
}],
],

# Indicates if gcmole tools are downloaded by a hook.
Expand Down Expand Up @@ -990,26 +962,6 @@
'-mx32',
],
}], # v8_target_arch=="x32"
['linux_use_gold_flags==1', {
# Newer gccs and clangs support -fuse-ld, use the flag to force gold
# selection.
# gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html
'ldflags': [ '-fuse-ld=gold', ],
}],
['linux_use_bundled_binutils==1', {
'cflags': [
'-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
],
}],
['linux_use_bundled_gold==1', {
# Put our binutils, which contains gold in the search path. We pass
# the path to gold to the compiler. gyp leaves unspecified what the
# cwd is when running the compiler, so the normal gyp path-munging
# fails us. This hack gets the right path.
'ldflags': [
'-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
],
}],
['OS=="win"', {
'defines': [
'WIN32',
Expand Down Expand Up @@ -1195,21 +1147,6 @@
}],
],
}],
['linux_use_gold_flags==1', {
'target_conditions': [
['_toolset=="target"', {
'ldflags': [
# Experimentation found that using four linking threads
# saved ~20% of link time.
# https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
# Only apply this to the target linker, since the host
# linker might not be gold, but isn't used much anyway.
'-Wl,--threads',
'-Wl,--thread-count=4',
],
}],
],
}],
['v8_optimized_debug==0', {
'msvs_settings': {
'VCCLCompilerTool': {
Expand Down