mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp.git
synced 2026-05-09 18:41:36 +00:00
Allow setting patches compilers
This commit is contained in:
parent
316d827f21
commit
1f9be47c31
3 changed files with 6 additions and 6 deletions
4
.github/workflows/validate.yml
vendored
4
.github/workflows/validate.yml
vendored
|
|
@ -29,7 +29,7 @@ jobs:
|
||||||
key: ${{ matrix.os }}-z64re-ccache-${{ matrix.type }}-x64
|
key: ${{ matrix.os }}-z64re-ccache-${{ matrix.type }}-x64
|
||||||
- name: Prepare Build
|
- name: Prepare Build
|
||||||
run: |-
|
run: |-
|
||||||
apt-get install -y unzip
|
apt-get install -y unzip llvm-17 llvm-17-tools lld-17
|
||||||
git clone ${{ secrets.ZRE_REPO_WITH_PAT }}
|
git clone ${{ secrets.ZRE_REPO_WITH_PAT }}
|
||||||
unzip zre/files.zip > /dev/null 2>&1
|
unzip zre/files.zip > /dev/null 2>&1
|
||||||
- name: Run N64Recomp & RSPRecomp
|
- name: Run N64Recomp & RSPRecomp
|
||||||
|
|
@ -45,7 +45,7 @@ jobs:
|
||||||
# enable ccache
|
# enable ccache
|
||||||
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_CXX_COMPILER=clang++-17 -DCMAKE_C_COMPILER=clang-17 -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++"
|
cmake -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=clang++-17 -DCMAKE_C_COMPILER=clang-17 -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++" -DPATCHES_C_COMPILER=clang-17 -DPATCHES_LD=ld.lld-17 -DPATCHES_OBJCOPY=llvm-objcopy-17
|
||||||
cmake --build cmake-build --config ${{ matrix.type }} --target Zelda64Recompiled -j 8
|
cmake --build cmake-build --config ${{ matrix.type }} --target Zelda64Recompiled -j 8
|
||||||
- name: Prepare Archive
|
- name: Prepare Archive
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,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
|
COMMAND CC=${PATCHES_C_COMPILER} LD=${PATCHES_LD} OBJCOPY=${PATCHES_OBJCOPY} 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
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
TARGET = patches.elf
|
TARGET = patches.elf
|
||||||
|
|
||||||
CC := clang
|
CC ?= clang
|
||||||
LD := ld.lld
|
LD ?= ld.lld
|
||||||
OBJCOPY := llvm-objcopy
|
OBJCOPY ?= llvm-objcopy
|
||||||
|
|
||||||
CFLAGS := -target mips -mips2 -mabi=32 -O2 -G0 -mno-abicalls -mno-odd-spreg -mno-check-zero-division \
|
CFLAGS := -target mips -mips2 -mabi=32 -O2 -G0 -mno-abicalls -mno-odd-spreg -mno-check-zero-division \
|
||||||
-fomit-frame-pointer -ffast-math -fno-unsafe-math-optimizations -fno-builtin-memset \
|
-fomit-frame-pointer -ffast-math -fno-unsafe-math-optimizations -fno-builtin-memset \
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue