Automatically detect the (clang-)cl target architecture instead of assuming amd64. Note that -print-target-triple is now used in favor of -dumpmachine for all versions of clang. This option has been around for ages in the regular clang driver but is only supported by clang-cl as of LLVM 18, which isn't yet available via the Visual Studio installer but is available through a standalone installer on GitHub.
This commit also adds a compiler flag to the command line when targeting arm64 with cl to work around an optimizer bug.
Automatically detect the (clang-)cl target architecture instead of assuming amd64. Note that -print-target-triple is now used in favor of -dumpmachine for all versions of clang. This option has been around for ages in the regular clang driver but is only supported by clang-cl as of LLVM 18, which isn't yet available via the Visual Studio installer but is available through a standalone installer on GitHub.
This commit also adds a compiler flag to the command line when targeting arm64 with cl to work around an optimizer bug.