diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4f9c823..d2f5f87 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -99,7 +99,7 @@ jobs: version: "5.0.0-beta2" - name: Generate project files - run: premake5 gmake2 + run: premake5 --cc=clang gmake2 - name: Set up problem matching uses: ammaraskar/gcc-problem-matcher@master diff --git a/README.md b/README.md index d8f036f..fd2d679 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,5 @@ This is the master server our clients use. It is based on the DP Master Server ( **IMPORTANT** For Unix systems, you must use Clang to compile this project. You will also be required to install the LLVM C++ Standard library to run this program. -If you need to use another compiler, like GCC, you must use the [Mold](https://github.com/rui314/mold) linker. Additionally, you must tweak the Premake5.lua script as it is hardcoded to use Clang. +If you need to use another compiler, like GCC, you must use the [Mold](https://github.com/rui314/mold) linker. Additionally, you may have to tweak the Premake5.lua script. +I only support a few platforms, for more details see [build.yml](https://github.com/alterware/master-server/blob/master/.github/workflows/build.yml) diff --git a/premake5.lua b/premake5.lua index 8905688..e455a14 100644 --- a/premake5.lua +++ b/premake5.lua @@ -71,16 +71,18 @@ filter { "system:linux", "system:macosx" } filter {} if os.istarget("linux") then - filter { "platforms:arm64" } + filter { "toolset:clang*", "platforms:arm64" } buildoptions "--target=arm64-linux-gnu" linkoptions "--target=arm64-linux-gnu" filter {} - buildoptions "-stdlib=libc++" - linkoptions "-stdlib=libc++" + filter { "toolset:clang*" } + buildoptions "-stdlib=libc++" + linkoptions "-stdlib=libc++" - -- always try to use lld. LD or Gold will not work - linkoptions "-fuse-ld=lld" + -- always try to use lld. LD or Gold will not work + linkoptions "-fuse-ld=lld" + filter {} end filter { "system:macosx", "platforms:arm64" }