You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a fully set-up MSVC environment (e.g. an environment set-up by Visual Studio's vcvarsall.bat) with a target of AArch64 ($Env:VSCMD_ARG_TGT_ARCH == arm64) or ARM ($Env:VSCMD_ARG_TGT_ARCH == arm), LDC will set-up an MSVC environment for x86-64 or x86, even if the -mtriple supplied to LDC is aarch64-windows or arm-windows (for example).
This results in the wrong libraries being supplied to the linker, and C files being preprocessed for the wrong target when cl is used for preprocessing.
This seems to be because setupMsvcEnvironmentImpl expects only x64 or x86 for the VSCMD_ARG_TGT_ARCH environment variable:
In a fully set-up MSVC environment (e.g. an environment set-up by Visual Studio's
vcvarsall.bat
) with a target of AArch64 ($Env:VSCMD_ARG_TGT_ARCH
==arm64
) or ARM ($Env:VSCMD_ARG_TGT_ARCH
==arm
), LDC will set-up an MSVC environment for x86-64 or x86, even if the-mtriple
supplied to LDC isaarch64-windows
orarm-windows
(for example).This results in the wrong libraries being supplied to the linker, and C files being preprocessed for the wrong target when
cl
is used for preprocessing.This seems to be because
setupMsvcEnvironmentImpl
expects onlyx64
orx86
for theVSCMD_ARG_TGT_ARCH
environment variable:ldc/driver/tool.cpp
Lines 295 to 300 in b75fc4c
The text was updated successfully, but these errors were encountered: