commit
bba5c8a39a
109 files changed
+14085
No files matched your search
@@ -0,0 +1,21 @@
|
||||
# Cross-compile host tools (voidlink) for x86_64-apple-macos12 using zig cc.
|
||||
# Used by the CI release pipeline; NOT for target-blob cross-compilation.
|
||||
#
|
||||
# zig 0.13 bundles macOS libc headers so no separate SDK is required.
|
||||
# Usage:
|
||||
# cmake -B build-mac -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/host-macos.cmake
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Darwin)
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
|
||||
# zig cc/c++ wrappers must be on PATH before invoking cmake.
|
||||
# The pipeline creates /usr/local/bin/zig-cc-mac and zig-cxx-mac.
|
||||
set(CMAKE_C_COMPILER zig-cc-mac CACHE FILEPATH "")
|
||||
set(CMAKE_CXX_COMPILER zig-cxx-mac CACHE FILEPATH "")
|
||||
|
||||
# Skip try_compile executable run — we can't execute macOS binaries on the Linux runner.
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY CACHE STRING "")
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
@@ -0,0 +1,24 @@
|
||||
# Cross-compile host tools (voidlink) for x86_64-windows-gnu using zig cc.
|
||||
# Used by the CI release pipeline; NOT for target-blob cross-compilation.
|
||||
#
|
||||
# Produces a statically linked .exe that has no mingw DLL dependencies.
|
||||
# Usage:
|
||||
# cmake -B build-win -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/host-windows.cmake
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CMAKE_SYSTEM_PROCESSOR AMD64)
|
||||
|
||||
# zig cc/c++ wrappers must be on PATH before invoking cmake.
|
||||
# The pipeline creates /usr/local/bin/zig-cc-win and zig-cxx-win.
|
||||
set(CMAKE_C_COMPILER zig-cc-win CACHE FILEPATH "")
|
||||
set(CMAKE_CXX_COMPILER zig-cxx-win CACHE FILEPATH "")
|
||||
|
||||
# Static link so the .exe is self-contained (no mingw DLLs needed).
|
||||
set(CMAKE_EXE_LINKER_FLAGS_INIT "-static")
|
||||
|
||||
# Skip try_compile executable run — we can't execute Windows binaries on the Linux runner.
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY CACHE STRING "")
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
@@ -0,0 +1,29 @@
|
||||
# Toolchain: clang targeting x86_64-linux-gnu (host glibc delegation)
|
||||
# Produces a PIC object file suitable for voidlink to pack into a .vlc section.
|
||||
#
|
||||
# Usage (from a consumer CMakeLists.txt driven by void_add_universal_library):
|
||||
# cmake -B build-linux -DCMAKE_TOOLCHAIN_FILE=<voidlibc>/cmake/toolchains/linux.cmake
|
||||
#
|
||||
# The resulting .o files are packed by voidlink; undefined symbols are resolved
|
||||
# against the host process's glibc/libpthread/libm at dlopen time via DT_NEEDED.
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
|
||||
find_program(_CLANG_EXE NAMES clang clang-18 clang-17 clang-16 REQUIRED)
|
||||
|
||||
set(CMAKE_C_COMPILER "${_CLANG_EXE}" CACHE FILEPATH "")
|
||||
set(CMAKE_CXX_COMPILER "${_CLANG_EXE}" CACHE FILEPATH "")
|
||||
|
||||
# -fPIC: required for DSO code; -c: produce .o, not linked binary.
|
||||
# -target: explicit x86_64-linux-gnu to avoid accidentally targeting musl.
|
||||
set(CMAKE_C_FLAGS_INIT "-target x86_64-unknown-linux-gnu -fPIC")
|
||||
set(CMAKE_CXX_FLAGS_INIT "-target x86_64-unknown-linux-gnu -fPIC")
|
||||
|
||||
# Object-only build: no linking step.
|
||||
set(CMAKE_EXE_LINKER_FLAGS_INIT "")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_INIT "")
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
@@ -0,0 +1,26 @@
|
||||
# Toolchain: clang targeting x86_64-apple-macos12 (libSystem delegation)
|
||||
# Produces a Mach-O object file suitable for voidlink to pack into a .vlc section.
|
||||
#
|
||||
# Usage (from a consumer CMakeLists.txt driven by void_add_universal_library):
|
||||
# cmake -B build-macos -DCMAKE_TOOLCHAIN_FILE=<voidlibc>/cmake/toolchains/macos.cmake
|
||||
#
|
||||
# The resulting .o files are packed by voidlink; undefined symbols are resolved
|
||||
# against the host process's /usr/lib/libSystem.B.dylib via LC_LOAD_DYLIB.
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Darwin)
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
|
||||
find_program(_CLANG_EXE NAMES clang clang-18 clang-17 clang-16 REQUIRED)
|
||||
|
||||
set(CMAKE_C_COMPILER "${_CLANG_EXE}" CACHE FILEPATH "")
|
||||
set(CMAKE_CXX_COMPILER "${_CLANG_EXE}" CACHE FILEPATH "")
|
||||
|
||||
set(CMAKE_C_FLAGS_INIT "-target x86_64-apple-macos12 -O2")
|
||||
set(CMAKE_CXX_FLAGS_INIT "-target x86_64-apple-macos12 -O2")
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS_INIT "")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_INIT "")
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
@@ -0,0 +1,30 @@
|
||||
# Toolchain: clang targeting x86_64-pc-windows-msvc (UCRT, MSVC ABI)
|
||||
# Produces a COFF object file suitable for voidlink to pack into a .vlc section.
|
||||
#
|
||||
# Usage (from a consumer CMakeLists.txt driven by void_add_universal_library):
|
||||
# cmake -B build-windows -DCMAKE_TOOLCHAIN_FILE=<voidlibc>/cmake/toolchains/windows.cmake
|
||||
#
|
||||
# The resulting .obj files are packed by voidlink; undefined symbols are resolved
|
||||
# against the host process's ucrtbase.dll / KERNEL32.DLL etc. via IMAGE_IMPORT_DESCRIPTOR.
|
||||
#
|
||||
# Note: MSVC-ABI cross-compilation requires clang + Windows SDK headers or
|
||||
# MinGW-w64 headers. If headers are unavailable, use --symlib overrides on
|
||||
# any non-UCRT imports.
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CMAKE_SYSTEM_PROCESSOR AMD64)
|
||||
|
||||
find_program(_CLANG_EXE NAMES clang clang-18 clang-17 clang-16 REQUIRED)
|
||||
|
||||
set(CMAKE_C_COMPILER "${_CLANG_EXE}" CACHE FILEPATH "")
|
||||
set(CMAKE_CXX_COMPILER "${_CLANG_EXE}" CACHE FILEPATH "")
|
||||
|
||||
set(CMAKE_C_FLAGS_INIT "-target x86_64-pc-windows-msvc -O2")
|
||||
set(CMAKE_CXX_FLAGS_INIT "-target x86_64-pc-windows-msvc -O2")
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS_INIT "")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_INIT "")
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
Reference in new issue
Block a user