Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Sep 5, 2024
1 parent 18e0fc3 commit b8b3ada
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
6 changes: 5 additions & 1 deletion util/zig/zig-aarch64-apple-darwin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ set(CMAKE_ASM_COMPILER "${CMAKE_CURRENT_SOURCE_DIR}/util/zig/zig-cc.sh")
set(CMAKE_C_COMPILER "${CMAKE_CURRENT_SOURCE_DIR}/util/zig/zig-cc.sh")
set(CMAKE_CXX_COMPILER "${CMAKE_CURRENT_SOURCE_DIR}/util/zig/zig-c++.sh")

# See issue: https://github.com/ziglang/zig/issues/10411
set(CMAKE_SYSTEM_NAME "Darwin")
set(CMAKE_SYSTEM_PROCESSOR "arm64")
set(CMAKE_OSX_ARCHITECTURES "arm64")

# See: https://github.com/ziglang/zig/issues/20493
set(CMAKE_SIZEOF_VOID_P 8)
# See: https://github.com/ziglang/zig/issues/10411
set(CMAKE_C_FLAGS "-D__ARM_NEON=1 -D__ARM_FEATURE_AES=1 -D__ARM_FEATURE_SHA2=1")
11 changes: 11 additions & 0 deletions util/zig/zig-aarch64-unknown-linux-gnu.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set(CMAKE_ASM_COMPILER "${CMAKE_CURRENT_SOURCE_DIR}/util/zig/zig-cc.sh")
set(CMAKE_C_COMPILER "${CMAKE_CURRENT_SOURCE_DIR}/util/zig/zig-cc.sh")
set(CMAKE_CXX_COMPILER "${CMAKE_CURRENT_SOURCE_DIR}/util/zig/zig-c++.sh")

set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_PROCESSOR "aarch64")

# See: https://github.com/ziglang/zig/issues/20493
set(CMAKE_SIZEOF_VOID_P 8)
# See: https://github.com/ziglang/zig/issues/10411
set(CMAKE_C_FLAGS "-D__ARM_NEON=1 -D__ARM_FEATURE_AES=1 -D__ARM_FEATURE_SHA2=1")
14 changes: 14 additions & 0 deletions util/zig/zig-x86_64-apple-darwin.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
set(CMAKE_ASM_COMPILER "${CMAKE_CURRENT_SOURCE_DIR}/util/zig/zig-cc.sh")
set(CMAKE_C_COMPILER "${CMAKE_CURRENT_SOURCE_DIR}/util/zig/zig-cc.sh")
set(CMAKE_CXX_COMPILER "${CMAKE_CURRENT_SOURCE_DIR}/util/zig/zig-c++.sh")

set(CMAKE_SYSTEM_NAME "Darwin")
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
set(CMAKE_OSX_ARCHITECTURES "x86_64")

# See: https://github.com/ziglang/zig/issues/20493
set(CMAKE_SIZEOF_VOID_P 8)
set(CMAKE_ASM_COMPILER_TARGET "x86_64-macos")
set(CMAKE_C_COMPILER_TARGET "x86_64-macos")
set(CMAKE_CXX_COMPILER_TARGET "x86_64-macos")
set(CMAKE_C_FLAGS "-D__x86_64=1")
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
set(CMAKE_ASM_COMPILER "${CMAKE_CURRENT_SOURCE_DIR}/util/zig/zig-cc.sh")
set(CMAKE_C_COMPILER "${CMAKE_CURRENT_SOURCE_DIR}/util/zig/zig-cc.sh")
set(CMAKE_CXX_COMPILER "${CMAKE_CURRENT_SOURCE_DIR}/util/zig/zig-c++.sh")
set(CMAKE_CXX_COMPILER "${CMAKE_CURRENT_SOURCE_DIR}/util/zig/zig-c++.sh")

set(CMAKE_SYSTEM_NAME "Darwin")
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
set(CMAKE_OSX_ARCHITECTURES "x86_64")

# See: https://github.com/ziglang/zig/issues/20493
set(CMAKE_SIZEOF_VOID_P 8)

0 comments on commit b8b3ada

Please sign in to comment.