wasm-micro-runtime/core/iwasm/compilation
teamchong edbcbb77da fix(aot): reserve x18 register on macOS ARM64
Apple reserves CPU register x18 for TLS on ARM64. When generating AOT
code for aarch64 on macOS, LLVM may use x18, causing crashes when the
AOT code runs on macOS ARM64 (M1/M2/M3).

This patch:
1. Detects darwin/macho ABI and sets correct vendor string
2. Detects darwin/apple in default triple for platform detection
3. Adds +reserve-x18 to LLVM target features for aarch64 on macOS

The fix only applies when compiling on macOS ARM64 hosts, ensuring
generated AOT code is compatible with Apple's platform requirements.
2025-12-29 13:24:15 -05:00
..
debug dwarf_extractor.cpp: use macro control to be compatible with lower version toolchain (#4169) 2025-04-01 12:05:13 +08:00
simd Enable -Wdouble-promotion by default and fix related warnings (#4603) 2025-09-12 08:44:42 +08:00
aot_compiler.c add micro AMR_BUILD_LIME1 to enable minimal lime1 feature set (#4571) 2025-09-14 14:08:27 +08:00
aot_compiler.h Enable -Wdouble-promotion by default and fix related warnings (#4603) 2025-09-12 08:44:42 +08:00
aot_emit_aot_file.c fix a wamrc debug mode compile issue (#4470) 2025-07-10 08:29:31 +08:00
aot_emit_aot_file.h Expose more functions related to emitting AOT files (#3520) 2024-06-14 15:57:45 +08:00
aot_emit_compare.c Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_compare.h Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_const.c aot compiler: Fix NaN handling for opcode f32/f64.const in XIP mode (#3721) 2024-08-16 14:04:41 +08:00
aot_emit_const.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_control.c Prevent BuildPhi from encountering a null llvm_entry_block (#4663) 2025-10-16 10:19:44 +08:00
aot_emit_control.h Add support for metadata.code.branch_hint section (#4460) 2025-09-12 08:42:48 +08:00
aot_emit_conversion.c Remove indirect-load for constants on Xtensa Target to improve performance (#4162) 2025-04-02 14:39:03 +08:00
aot_emit_conversion.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_exception.c Add wamrc parameter to configure stack frame features (#3763) 2024-09-05 21:44:06 +08:00
aot_emit_exception.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_function.c Fix potential integer overflow issues (#4429) 2025-07-01 13:39:30 +08:00
aot_emit_function.h Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_gc.c Fix some more spelling issues (#3393) 2024-05-08 09:30:29 +08:00
aot_emit_gc.h Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_memory.c Merge commit from fork 2025-09-15 15:19:51 +08:00
aot_emit_memory.h add micro AMR_BUILD_LIME1 to enable minimal lime1 feature set (#4571) 2025-09-14 14:08:27 +08:00
aot_emit_numberic.c aot: add new u64 intrinsics (#4168) 2025-04-09 15:19:48 +08:00
aot_emit_numberic.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_parametric.c Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_parametric.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_stringref.c Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_stringref.h Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125) 2024-02-06 20:47:11 +08:00
aot_emit_table.c Fix some compile warnings and typos (#3854) 2024-10-15 16:04:58 +08:00
aot_emit_table.h Refine AOT/JIT code call wasm-c-api import process (#2982) 2024-01-10 18:37:02 +08:00
aot_emit_variable.c Add wasm module global type information APIs (#3406) 2024-05-10 09:15:58 +08:00
aot_emit_variable.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_llvm_extra.cpp LLVM: don't verify instcombine fixpoint (#4219) 2025-04-27 11:30:35 +08:00
aot_llvm_extra2.cpp Switch from deprecated overload of createTargetMachine (#4650) 2025-10-09 13:33:11 +08:00
aot_llvm_extra2.h aot: Fix LLVMSetTailCallKind check (#3099) 2024-01-30 20:50:33 +08:00
aot_llvm.c fix(aot): reserve x18 register on macOS ARM64 2025-12-29 13:24:15 -05:00
aot_llvm.h add micro AMR_BUILD_LIME1 to enable minimal lime1 feature set (#4571) 2025-09-14 14:08:27 +08:00
aot_orc_extra.cpp GlobalValueSet was moved to IRPartitionLayer recently, but we have a local definition anyway (#3899) 2024-11-13 15:11:33 +08:00
aot_orc_extra.h Fix some more spelling issues (#3393) 2024-05-08 09:30:29 +08:00
aot_orc_extra2.cpp Fix some more spelling issues (#3393) 2024-05-08 09:30:29 +08:00
aot_stack_frame_comp.c Implement option for skipping function index in the callstack (#3785) 2024-09-11 16:08:37 +08:00
aot_stack_frame_comp.h AOT call stack optimizations (#3773) 2024-09-10 09:05:23 +08:00
aot_stack_frame.h AOT call stack optimizations (#3773) 2024-09-10 09:05:23 +08:00
aot.c Add support for metadata.code.branch_hint section (#4460) 2025-09-12 08:42:48 +08:00
aot.h Add support for metadata.code.branch_hint section (#4460) 2025-09-12 08:42:48 +08:00
iwasm_compl.cmake fix: correct typos and improve comments across multiple files by codespell (#4116) 2025-03-07 08:21:54 +08:00