diff options
-rwxr-xr-x | msvc-cl-common | 9 | ||||
-rwxr-xr-x | msvc-lib-common | 2 | ||||
-rwxr-xr-x | msvc-link-common | 8 | ||||
-rwxr-xr-x | msvc-rc-common | 4 |
4 files changed, 16 insertions, 7 deletions
diff --git a/msvc-cl-common b/msvc-cl-common index 33a68ef..e101dd8 100755 --- a/msvc-cl-common +++ b/msvc-cl-common @@ -1,7 +1,8 @@ #! /usr/bin/env bash -# Common cl.exe driver that expects the VC, INCLUDE, and LIB variables to -# be set for the specific MSVC version/configuration. +# Common cl.exe driver that expects the VCBIN, INCLUDE, and, if running as a +# linker, SDKBIN, LIB variables to be set for the specific MSVC +# version/configuration. trap "{ exit 1; }" ERR set -o errtrace # Trap in functions. @@ -144,4 +145,8 @@ done export INCLUDE export LIB +# The linker may need to run mt.exe which is in the SDK. +# +export WINEPATH=$SDKBIN + msvc_exec $diag "$VCBIN\\cl.exe" "${args[@]}" diff --git a/msvc-lib-common b/msvc-lib-common index 7f10223..4cd1c51 100755 --- a/msvc-lib-common +++ b/msvc-lib-common @@ -1,6 +1,6 @@ #! /usr/bin/env bash -# Common lib.exe driver that expects the VC and LIB variables to be set for +# Common lib.exe driver that expects the VCBIN and LIB variables to be set for # the specific MSVC version/configuration. # # It's not clear/documented why we need LIB or what the /LIBPATH option is diff --git a/msvc-link-common b/msvc-link-common index 7b3481a..a83bac9 100755 --- a/msvc-link-common +++ b/msvc-link-common @@ -1,7 +1,7 @@ #! /usr/bin/env bash -# Common link.exe driver that expects the VC and LIB variables to be set for -# the specific MSVC version/configuration. +# Common link.exe driver that expects the VCBIN, SDKBIN, and LIB variables to +# be set for the specific MSVC version/configuration. trap "{ exit 1; }" ERR set -o errtrace # Trap in functions. @@ -177,6 +177,10 @@ done export LIB +# link.exe may need to run mt.exe which is in the SDK. +# +export WINEPATH=$SDKBIN + # link.exe always sends diagnostics to stdout. # msvc_exec 1 "$VCBIN\\link.exe" "${args[@]}" diff --git a/msvc-rc-common b/msvc-rc-common index 421d232..17c9333 100755 --- a/msvc-rc-common +++ b/msvc-rc-common @@ -1,7 +1,7 @@ #! /usr/bin/env bash -# Common rc.exe driver that expects the VC and INCLUDE variables to be set for -# the specific MSVC version/configuration. +# Common rc.exe driver that expects the SDKBIN and INCLUDE variables to be set +# for the specific MSVC version/configuration. trap "{ exit 1; }" ERR set -o errtrace # Trap in functions. |