From eafb021015066a20ea9a8d9dc7d4c632727fef54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 19 Nov 2020 16:47:57 +0100 Subject: [PATCH] SCons: Remove unnecessary $LINK overrides As of SCons 4.0.1, the default value for $LINK is $SMARTLINK, which itself is a function that will use $CXX as linker for C++: https://github.com/SCons/scons/blob/4.0.1/SCons/Tool/link.py#L327-L328 https://github.com/SCons/scons/blob/4.0.1/SCons/Tool/link.py#L54-L76 So we don't need to manually specify the same value as $CXX for $LINK. (cherry picked from commit 2e4bff1cfea3843953a176656490339305a2c779) --- platform/javascript/detect.py | 1 - platform/osx/detect.py | 1 - platform/windows/detect.py | 7 +++---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index e6e35f6aa9f..71189cf697a 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -107,7 +107,6 @@ def configure(env): env["CC"] = "emcc" env["CXX"] = "em++" - env["LINK"] = "emcc" env["AR"] = "emar" env["RANLIB"] = "emranlib" diff --git a/platform/osx/detect.py b/platform/osx/detect.py index baa48f90ead..b8b26b92628 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -97,7 +97,6 @@ def configure(env): mpprefix = os.environ.get("MACPORTS_PREFIX", "/opt/local") mpclangver = env["macports_clang"] env["CC"] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/clang" - env["LINK"] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/clang++" env["CXX"] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/clang++" env["AR"] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/llvm-ar" env["RANLIB"] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/llvm-ranlib" diff --git a/platform/windows/detect.py b/platform/windows/detect.py index dd2a05e8762..c91d693754c 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -354,18 +354,17 @@ def configure_mingw(env): if env["use_llvm"]: env["CC"] = mingw_prefix + "clang" - env["AS"] = mingw_prefix + "as" env["CXX"] = mingw_prefix + "clang++" + env["AS"] = mingw_prefix + "as" env["AR"] = mingw_prefix + "ar" env["RANLIB"] = mingw_prefix + "ranlib" - env["LINK"] = mingw_prefix + "clang++" else: env["CC"] = mingw_prefix + "gcc" - env["AS"] = mingw_prefix + "as" env["CXX"] = mingw_prefix + "g++" + env["AS"] = mingw_prefix + "as" env["AR"] = mingw_prefix + "gcc-ar" env["RANLIB"] = mingw_prefix + "gcc-ranlib" - env["LINK"] = mingw_prefix + "g++" + env["x86_libtheora_opt_gcc"] = True if env["use_lto"]: