Skip to content

Commit 70e9ece

Browse files
iandrccodebytere
iandrc
authored andcommitted
build: toolchain.gypi and node_gyp.py cleanup
Removed `linux_use_gold_flag`, `linux_use_bundled_gold` and `linux_use_bundled_binutils` flags from `tools/v8_gypfiles/toolchain.gypi` and `/tools/gyp_node.py`. Fixes: #34256 PR-URL: #34268 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 692a735 commit 70e9ece

File tree

2 files changed

+0
-75
lines changed

2 files changed

+0
-75
lines changed

tools/gyp_node.py

-12
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,6 @@ def run_gyp(args):
4545
args.append('-Dcomponent=static_library')
4646
args.append('-Dlibrary=static_library')
4747

48-
# Don't compile with -B and -fuse-ld=, we don't bundle ld.gold. Can't be
49-
# set in common.gypi due to how deps/v8/build/toolchain.gypi uses them.
50-
args.append('-Dlinux_use_bundled_binutils=0')
51-
args.append('-Dlinux_use_bundled_gold=0')
52-
args.append('-Dlinux_use_gold_flags=0')
53-
54-
# Set the current program to this module. This is done because gyp
55-
# will use the program path in targets it generates. If this script was called
56-
# by another script the program name will not be gyp_node.py but whatever
57-
# the name of the script that called it is, leading to incorrect commands
58-
# in generated targets (for example cmd_regen_makefile).
59-
sys.argv[0] = os.path.abspath(__file__)
6048
rc = gyp.main(args)
6149
if rc != 0:
6250
print('Error running GYP')

tools/v8_gypfiles/toolchain.gypi

-63
Original file line numberDiff line numberDiff line change
@@ -99,34 +99,6 @@
9999
['OS=="linux" and host_arch=="ia32"', {
100100
'binutils_dir%': 'third_party/binutils/Linux_ia32/Release/bin',
101101
}],
102-
103-
# linux_use_bundled_gold: whether to use the gold linker binary checked
104-
# into third_party/binutils. Force this off via GYP_DEFINES when you
105-
# are using a custom toolchain and need to control -B in ldflags.
106-
# Do not use 32-bit gold on 32-bit hosts as it runs out address space
107-
# for component=static_library builds.
108-
['((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")', {
109-
'linux_use_bundled_gold%': 1,
110-
}, {
111-
'linux_use_bundled_gold%': 0,
112-
}],
113-
# linux_use_bundled_binutils: whether to use the binary binutils
114-
# checked into third_party/binutils. These are not multi-arch so cannot
115-
# be used except on x86 and x86-64 (the only two architectures which
116-
# are currently checke in). Force this off via GYP_DEFINES when you
117-
# are using a custom toolchain and need to control -B in cflags.
118-
['OS=="linux" and (target_arch=="ia32" or target_arch=="x64")', {
119-
'linux_use_bundled_binutils%': 1,
120-
}, {
121-
'linux_use_bundled_binutils%': 0,
122-
}],
123-
# linux_use_gold_flags: whether to use build flags that rely on gold.
124-
# On by default for x64 Linux.
125-
['OS=="linux" and target_arch=="x64"', {
126-
'linux_use_gold_flags%': 1,
127-
}, {
128-
'linux_use_gold_flags%': 0,
129-
}],
130102
],
131103

132104
# Indicates if gcmole tools are downloaded by a hook.
@@ -990,26 +962,6 @@
990962
'-mx32',
991963
],
992964
}], # v8_target_arch=="x32"
993-
['linux_use_gold_flags==1', {
994-
# Newer gccs and clangs support -fuse-ld, use the flag to force gold
995-
# selection.
996-
# gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html
997-
'ldflags': [ '-fuse-ld=gold', ],
998-
}],
999-
['linux_use_bundled_binutils==1', {
1000-
'cflags': [
1001-
'-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
1002-
],
1003-
}],
1004-
['linux_use_bundled_gold==1', {
1005-
# Put our binutils, which contains gold in the search path. We pass
1006-
# the path to gold to the compiler. gyp leaves unspecified what the
1007-
# cwd is when running the compiler, so the normal gyp path-munging
1008-
# fails us. This hack gets the right path.
1009-
'ldflags': [
1010-
'-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
1011-
],
1012-
}],
1013965
['OS=="win"', {
1014966
'defines': [
1015967
'WIN32',
@@ -1195,21 +1147,6 @@
11951147
}],
11961148
],
11971149
}],
1198-
['linux_use_gold_flags==1', {
1199-
'target_conditions': [
1200-
['_toolset=="target"', {
1201-
'ldflags': [
1202-
# Experimentation found that using four linking threads
1203-
# saved ~20% of link time.
1204-
# https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
1205-
# Only apply this to the target linker, since the host
1206-
# linker might not be gold, but isn't used much anyway.
1207-
'-Wl,--threads',
1208-
'-Wl,--thread-count=4',
1209-
],
1210-
}],
1211-
],
1212-
}],
12131150
['v8_optimized_debug==0', {
12141151
'msvs_settings': {
12151152
'VCCLCompilerTool': {

0 commit comments

Comments
 (0)