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.
This commit is contained in:
parent
9eb4b6d91a
commit
0cd8b27b56
|
@ -425,8 +425,13 @@ if selected_platform in platform_list:
|
||||||
# (SH)LIBSUFFIX will be used for our own built libraries
|
# (SH)LIBSUFFIX will be used for our own built libraries
|
||||||
# LIBSUFFIXES contains LIBSUFFIX and SHLIBSUFFIX by default,
|
# LIBSUFFIXES contains LIBSUFFIX and SHLIBSUFFIX by default,
|
||||||
# so we need to append the default suffixes to keep the ability
|
# so we need to append the default suffixes to keep the ability
|
||||||
# to link against thirdparty libraries (.a, .so, .dll, etc.).
|
# to link against thirdparty libraries (.a, .so, .lib, etc.).
|
||||||
env["LIBSUFFIXES"] += [env["LIBSUFFIX"], env["SHLIBSUFFIX"]]
|
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["LIBSUFFIX"] = suffix + env["LIBSUFFIX"]
|
||||||
env["SHLIBSUFFIX"] = suffix + env["SHLIBSUFFIX"]
|
env["SHLIBSUFFIX"] = suffix + env["SHLIBSUFFIX"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue