From ce2fee909cd814c1eaf1e5c86d14c2a71927474b Mon Sep 17 00:00:00 2001 From: iandrc Date: Thu, 9 Jul 2020 03:05:04 +0300 Subject: [PATCH] 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: https://github.com/nodejs/node/issues/34256 --- tools/gyp_node.py | 12 ------ tools/v8_gypfiles/toolchain.gypi | 63 -------------------------------- 2 files changed, 75 deletions(-) diff --git a/tools/gyp_node.py b/tools/gyp_node.py index 333c89f5ae9f5a..8c7493f3292e83 100755 --- a/tools/gyp_node.py +++ b/tools/gyp_node.py @@ -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') diff --git a/tools/v8_gypfiles/toolchain.gypi b/tools/v8_gypfiles/toolchain.gypi index 196196a4e2d65b..d4bad70d45025e 100644 --- a/tools/v8_gypfiles/toolchain.gypi +++ b/tools/v8_gypfiles/toolchain.gypi @@ -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. @@ -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