diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aef4e4c..438c7fc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -134,11 +134,14 @@ jobs: - Release arch: - x64 + - arm64 include: - configuration: Release config: release - arch: x64 platform: x64 + - arch: arm64 + platform: arm64 steps: - name: Check out files uses: actions/checkout@v3.5.3 diff --git a/deps/premake/libtomcrypt.lua b/deps/premake/libtomcrypt.lua index 7dee7c8..8810435 100644 --- a/deps/premake/libtomcrypt.lua +++ b/deps/premake/libtomcrypt.lua @@ -57,6 +57,10 @@ function libtomcrypt.project() filter "platforms:x64" buildoptions "-march=native" filter {} + + filter "platforms:arm64" + buildoptions "-mcpu=apple-m1" + filter {} end warnings "Off" diff --git a/premake5.lua b/premake5.lua index 4fbcc67..1f89638 100644 --- a/premake5.lua +++ b/premake5.lua @@ -39,7 +39,7 @@ targetdir "%{wks.location}/bin/%{cfg.platform}/%{cfg.buildcfg}" configurations {"Debug", "Release"} if os.istarget("darwin") then - platforms {"x64"} + platforms {"x64", "arm64"} else platforms {"x86", "x64", "arm64"} end @@ -79,6 +79,13 @@ if os.istarget("linux") or os.istarget("darwin") then linkoptions "-pthread" end +if os.istarget("darwin") then + filter "platforms:arm64" + buildoptions "-arch arm64" + linkoptions "-arch arm64" + filter {} +end + if os.getenv("CI") then defines "CI" end