From: <sv...@op...> - 2024-10-20 12:46:00
|
Author: manx Date: Sun Oct 20 14:45:48 2024 New Revision: 21877 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21877 Log: [Imp] build: premake: Add ARM64EC support. Modified: trunk/OpenMPT/build/premake/premake.lua Modified: trunk/OpenMPT/build/premake/premake.lua ============================================================================== --- trunk/OpenMPT/build/premake/premake.lua Sun Oct 20 14:43:07 2024 (r21876) +++ trunk/OpenMPT/build/premake/premake.lua Sun Oct 20 14:45:48 2024 (r21877) @@ -67,6 +67,56 @@ +premake.ARM64EC = "ARM64EC" + +premake.api.unregister("architecture") + +premake.api.register { + name = "architecture", + scope = "config", + kind = "string", + allowed = { + "universal", + premake.X86, + premake.X86_64, + premake.ARM, + premake.ARM64, + premake.ARM64EC, + }, + aliases = { + i386 = premake.X86, + amd64 = premake.X86_64, + x32 = premake.X86, + x64 = premake.X86_64, + }, +} + +premake.vstudio.vs200x_architectures = +{ + win32 = "x86", + x86 = "x86", + x86_64 = "x64", + ARM = "ARM", + ARM64 = "ARM64", + ARM64EC = "ARM64EC", +} + +function premake.vstudio.vc2010.windowsSDKDesktopARM64ECSupport(cfg) + if cfg.system == premake.WINDOWS then + if cfg.architecture == premake.ARM64EC then + premake.w('<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>') + end + end +end + +premake.override(premake.vstudio.vc2010.elements, "configurationProperties", function(base, prj) + local calls = base(prj) + table.insertafter(calls, premake.vstudio.vc2010.windowsSDKDesktopARMSupport, premake.vstudio.vc2010.windowsSDKDesktopARM64ECSupport) + return calls +end) + + + premake.api.register { name = "spectremitigations", scope = "config", |