Force the use of static linkage with MSVC in the ml script.

This fixes a problem that made it impossible to use mmake with MSVC.

scripts/ml.in:
     Force the use of static linkage with MSVC.
This commit is contained in:
Julien Fischer
2020-01-23 20:31:31 +11:00
parent ca58b4c2a4
commit 5a5ea709b9

View File

@@ -2,7 +2,8 @@
# vim: ts=4 sw=4 noet
# @configure_input@
#---------------------------------------------------------------------------#
# Copyright (C) 1995-2008, 2010-2011The University of Melbourne.
# Copyright (C) 1995-2008, 2010-2011 The University of Melbourne.
# Copyright (C) 2013-2014, 2016, 2019-2020 The Mercury team.
# This file may only be copied under the terms of the GNU General
# Public License - see the file COPYING in the Mercury distribution.
#---------------------------------------------------------------------------#
@@ -145,6 +146,15 @@ case $mercury_libs in
;;
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 you haven't set all_libs, set it to the default value
# (shared on most systems).
case $all_libs in
@@ -169,6 +179,12 @@ case $all_libs in
;;
esac
case "$C_COMPILER_TYPE" in
msvc*)
all_libs=static
;;
esac
# Defaults have been set, now set options.
case $all_libs in