Install llvm and use clang as compiler

This commit is contained in:
dcvz 2024-05-17 17:13:18 +02:00
parent 1bb2638935
commit 8c5c7ec758
2 changed files with 7 additions and 4 deletions

View file

@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
build-unix: build-unix:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
strategy: strategy:
matrix: matrix:
type: [ Debug, Release ] type: [ Debug, Release ]
@ -27,7 +27,7 @@ jobs:
if: runner.os == 'Linux' if: runner.os == 'Linux'
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y ninja-build libsdl2-dev libgtk-3-dev lld sudo apt-get install -y ninja-build libsdl2-dev libgtk-3-dev lld llvm clang
# Install SDL2 # Install SDL2
echo ::group::install SDL2 echo ::group::install SDL2
@ -77,7 +77,10 @@ jobs:
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build cmake -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build
cmake --build cmake-build --config ${{ matrix.type }} --target Zelda64Recompiled -j 8 -- -v cmake --build cmake-build --config ${{ matrix.type }} --target Zelda64Recompiled -j 8
env:
CC: clang
CXX: clang++
- name: Archive Zelda64Recomp - name: Archive Zelda64Recomp
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:

View file

@ -77,7 +77,7 @@ set_source_files_properties(${CMAKE_SOURCE_DIR}/RecompiledPatches/patches.c PROP
# Build patches elf # Build patches elf
add_custom_target(PatchesBin add_custom_target(PatchesBin
COMMAND make -d COMMAND make
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/patches WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/patches
BYPRODUCTS ${CMAKE_SOURCE_DIR}/patches/patches.bin BYPRODUCTS ${CMAKE_SOURCE_DIR}/patches/patches.bin
) )