summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/CHANGES.txt3
-rw-r--r--src/engine/SCons/Tool/mslink.py6
-rw-r--r--test/LINK/LINKCOMSTR.py14
-rw-r--r--test/LINK/SHLINKCOMSTR.py16
4 files changed, 36 insertions, 3 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 9df2d34..6b8cf5f 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -6,6 +6,9 @@
RELEASE 2.X.X -
+ From smallbub on Bitbucket:
+ - Fix LINKCOMSTR, SHLINKCOMSTR, and LDMODULECOMSTR on Windows (#2833).
+
From Mortoray:
- Make -s (silent mode) be silent about entering subdirs (#2976).
- Fix cloning of builders when cloning environment (#2821).
diff --git a/src/engine/SCons/Tool/mslink.py b/src/engine/SCons/Tool/mslink.py
index 35c9de6..40f112b 100644
--- a/src/engine/SCons/Tool/mslink.py
+++ b/src/engine/SCons/Tool/mslink.py
@@ -237,11 +237,11 @@ embedManifestExeCheckAction = SCons.Action.Action(embedManifestExeCheck, None)
regServerAction = SCons.Action.Action("$REGSVRCOM", "$REGSVRCOMSTR")
regServerCheck = SCons.Action.Action(RegServerFunc, None)
-shlibLinkAction = SCons.Action.Action('${TEMPFILE("$SHLINK $SHLINKFLAGS $_SHLINK_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_SHLINK_SOURCES")}')
+shlibLinkAction = SCons.Action.Action('${TEMPFILE("$SHLINK $SHLINKFLAGS $_SHLINK_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_SHLINK_SOURCES")}', '$SHLINKCOMSTR')
compositeShLinkAction = shlibLinkAction + regServerCheck + embedManifestDllCheckAction
-ldmodLinkAction = SCons.Action.Action('${TEMPFILE("$LDMODULE $LDMODULEFLAGS $_LDMODULE_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_LDMODULE_SOURCES")}')
+ldmodLinkAction = SCons.Action.Action('${TEMPFILE("$LDMODULE $LDMODULEFLAGS $_LDMODULE_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_LDMODULE_SOURCES")}', '$LDMODULECOMSTR')
compositeLdmodAction = ldmodLinkAction + regServerCheck + embedManifestDllCheckAction
-exeLinkAction = SCons.Action.Action('${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET.windows $_LIBDIRFLAGS $_LIBFLAGS $_PDB $SOURCES.windows")}')
+exeLinkAction = SCons.Action.Action('${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET.windows $_LIBDIRFLAGS $_LIBFLAGS $_PDB $SOURCES.windows")}', '$LINKCOMSTR')
compositeLinkAction = exeLinkAction + embedManifestExeCheckAction
def generate(env):
diff --git a/test/LINK/LINKCOMSTR.py b/test/LINK/LINKCOMSTR.py
index 113bdcd..8fd8adc 100644
--- a/test/LINK/LINKCOMSTR.py
+++ b/test/LINK/LINKCOMSTR.py
@@ -72,7 +72,21 @@ Linking test1.exe from test1.obj test2.obj
test.must_match('test1.exe', "test1.obj\ntest2.obj\n")
+# Now test an actual compile and link. Since MS Windows
+# resets the link actions, this could fail even if the above
+# test passed.
+test.write('SConstruct', """
+env = Environment(CXXCOMSTR = 'Compiling $TARGET ...',
+ LINKCOMSTR = 'Linking $TARGET ...')
+env.Program('test', 'test.cpp')
+""")
+test.write('test.cpp', """
+int main(int argc, char **argv) {}
+""")
+test.run()
+if ("Linking" not in test.stdout()):
+ test.fail_test()
test.pass_test()
diff --git a/test/LINK/SHLINKCOMSTR.py b/test/LINK/SHLINKCOMSTR.py
index dd6f22b..f97040a 100644
--- a/test/LINK/SHLINKCOMSTR.py
+++ b/test/LINK/SHLINKCOMSTR.py
@@ -91,6 +91,22 @@ Linking shared test3.dll from test1.obj test2.obj
test.must_match('test3.dll', "test1.c\ntest2.c\n")
+# Now test an actual compile and link. Since MS Windows
+# resets the link actions, this could fail even if the above
+# test passed.
+test.write('SConstruct', """
+env = Environment(CXXCOMSTR = 'Compiling $TARGET ...',
+ SHLINKCOMSTR = 'Shared-Linking $TARGET ...')
+env.SharedLibrary('test', 'test.cpp')
+""")
+test.write('test.cpp', """
+int i;
+""")
+
+test.run()
+if ("Shared-Linking" not in test.stdout()):
+ test.fail_test()
+
test.pass_test()