ares-emulator / ares

ares is a cross-platform, open source, multi-system emulator, focusing on accuracy and preservation.
https://ares-emu.net
Other
945 stars 115 forks source link

build: detect cl target architecture #1562

Closed invertego closed 2 months ago

invertego commented 2 months ago

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.