Reorganize toolchain files
This commit is contained in:
@@ -7,14 +7,13 @@ Reference: https://zig.news/kristoff/cross-compile-a-c-c-project-with-zig-3599
|
||||
## Building
|
||||
|
||||
- [Install zig](https://ziglang.org/learn/getting-started/#installing-zig) in your PATH (`choco install zig` on Windows)
|
||||
- `cmake -B build-aarch64 -G Ninja -DCMAKE_TOOLCHAIN_FILE=cmake/zig-toolchain-aarch64.cmake`
|
||||
- `cmake -B build-aarch64 -G Ninja --toolchain aarch64-linux-gnu.cmake`
|
||||
- `cmake --build build-arch64`
|
||||
|
||||
You can create toolchains for other triples like this. Here is an example to build for Windows on ARM64:
|
||||
You can create toolchains for other triples as well, just create a file named `aarch64-windows-gnu.cmake` with the following contents to build for Windows on ARM64:
|
||||
|
||||
```cmake
|
||||
set(ZIG_TARGET "aarch64-windows-gnu")
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/zig-toolchain.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/cmake/zig-toolchain.cmake)
|
||||
```
|
||||
|
||||
## clangd
|
||||
|
||||
Reference in New Issue
Block a user