Compare commits

...

1 Commits

Author SHA1 Message Date
Diavolo
2536651533
build(premake): do not hardcode Premake5.lua to use clang 2023-12-08 16:00:33 +01:00
3 changed files with 10 additions and 7 deletions

View File

@ -99,7 +99,7 @@ jobs:
version: "5.0.0-beta2" version: "5.0.0-beta2"
- name: Generate project files - name: Generate project files
run: premake5 gmake2 run: premake5 --cc=clang gmake2
- name: Set up problem matching - name: Set up problem matching
uses: ammaraskar/gcc-problem-matcher@master uses: ammaraskar/gcc-problem-matcher@master

View File

@ -12,4 +12,5 @@ This is the master server our clients use. It is based on the DP Master Server (
**IMPORTANT** **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. 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)

View File

@ -71,16 +71,18 @@ filter { "system:linux", "system:macosx" }
filter {} filter {}
if os.istarget("linux") then if os.istarget("linux") then
filter { "platforms:arm64" } filter { "toolset:clang*", "platforms:arm64" }
buildoptions "--target=arm64-linux-gnu" buildoptions "--target=arm64-linux-gnu"
linkoptions "--target=arm64-linux-gnu" linkoptions "--target=arm64-linux-gnu"
filter {} filter {}
filter { "toolset:clang*" }
buildoptions "-stdlib=libc++" buildoptions "-stdlib=libc++"
linkoptions "-stdlib=libc++" linkoptions "-stdlib=libc++"
-- always try to use lld. LD or Gold will not work -- always try to use lld. LD or Gold will not work
linkoptions "-fuse-ld=lld" linkoptions "-fuse-ld=lld"
filter {}
end end
filter { "system:macosx", "platforms:arm64" } filter { "system:macosx", "platforms:arm64" }