Skip to content

Commit

Permalink
goalc: resolve x86 compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
xTVaser committed Jan 4, 2024
1 parent 8bb8dfe commit 3767847
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/macos-build-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

# TODO - not relevant on an intel runner
# - name: Set up ARM64 environment
# run: sudo softwareupdate --install-rosetta --agree-to-license

- name: Install Package Dependencies
run: arch -arm64 brew install cmake ninja
# TODO - arch -arm64
run: brew install cmake ninja

- name: Setup Buildcache
uses: mikehardy/[email protected]
Expand Down
3 changes: 2 additions & 1 deletion game/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ else()
message(STATUS "Non-ARM64 architecture detected")
endif()

if(ARM64_ARCH)
# TODO - kinda a gross hack, should pass in an explicit flag later
if(ARM64_ARCH OR CMAKE_CXX_COMPILER_TARGET STREQUAL "arm64-apple-darwin")
# Add your ARM64-specific configuration or build options here
set(OG_ASM_FUNCS_FILE kernel/asm_funcs_arm64.s)
enable_language(ASM)
Expand Down
3 changes: 1 addition & 2 deletions goalc/compiler/IR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -863,8 +863,7 @@ void IR_ConditionalBranch::do_codegen(emitter::ObjectGenerator* gen,
const AllocationResult& allocs,
emitter::IR_Record irec) {
#ifndef __aarch64__
Instruction jump_instr;
jump_instr = InstructionX86(0);
Instruction jump_instr = InstructionX86(0);
ASSERT(m_resolved);
switch (condition.kind) {
case ConditionKind::EQUAL:
Expand Down

0 comments on commit 3767847

Please sign in to comment.