summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorErik <35656626+SeleckyErik@users.noreply.github.com>2018-11-17 18:04:08 +0100
committerErik <35656626+SeleckyErik@users.noreply.github.com>2018-11-18 20:50:27 +0100
commit0cd8b27b567823c6dafe6adeabc067068d907f4a (patch)
tree022308c246c9a97c12c7bdd1350e686c50f98a3f /SConstruct
parent9eb4b6d91a64661f8e2823a70f935c602f8a725a (diff)
SCons: Corrects $LIBSUFFIXES environment variable for Windows
Maxes only .lib to be recoginzed as a valid input extension for linker on Windows. Closes issue #23769.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct9
1 files changed, 7 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index 628aac42af..8b7b95a600 100644
--- a/SConstruct
+++ b/SConstruct
@@ -425,8 +425,13 @@ if selected_platform in platform_list:
# (SH)LIBSUFFIX will be used for our own built libraries
# LIBSUFFIXES contains LIBSUFFIX and SHLIBSUFFIX by default,
# so we need to append the default suffixes to keep the ability
- # to link against thirdparty libraries (.a, .so, .dll, etc.).
- env["LIBSUFFIXES"] += [env["LIBSUFFIX"], env["SHLIBSUFFIX"]]
+ # to link against thirdparty libraries (.a, .so, .lib, etc.).
+ if os.name == "nt":
+ # On Windows, only static libraries and import libraries can be
+ # statically linked - both using .lib extension
+ env["LIBSUFFIXES"] += [env["LIBSUFFIX"]]
+ else:
+ env["LIBSUFFIXES"] += [env["LIBSUFFIX"], env["SHLIBSUFFIX"]]
env["LIBSUFFIX"] = suffix + env["LIBSUFFIX"]
env["SHLIBSUFFIX"] = suffix + env["SHLIBSUFFIX"]