[m-rev.] diff: fix github issue #101

Julien Fischer jfischer at opturion.com
Sun Mar 13 05:05:07 AEDT 2022


Fix github issue #101.

scripts/ml.in:
     Avoid turning --mercury-libs none into --mercury-libs static when
     using MSVC. This is causing the linker command line to be invalid.

Julien.

diff --git a/scripts/ml.in b/scripts/ml.in
index afa25fe..a96a00e 100644
--- a/scripts/ml.in
+++ b/scripts/ml.in
@@ -145,11 +145,14 @@ esac
  # We cannot determine if we are using MSVC by looking at FULLARCH;
  # we must use static linkage with it as we do not currently support
  # the use of DLLs on Windows.
-case "$C_COMPILER_TYPE" in
-    msvc*)
-        mercury_libs=static
-    ;;
-esac
+if test "$mercury_libs" != "none"
+then
+    case "$C_COMPILER_TYPE" in
+        msvc*)
+            mercury_libs=static
+        ;;
+    esac
+fi

  # If you haven't set all_libs, set it to the default value
  # (shared on most systems).


More information about the reviews mailing list