Skip to content

Commit 377d1b4

Browse files
committed
Refactor: Update cross-compilation script and related configurations
1 parent 2095d6c commit 377d1b4

6 files changed

Lines changed: 7 additions & 29 deletions

File tree

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
sudo apt-get update
2929
sudo apt-get install -y meson ninja-build
3030
- name: Generate cross file for ${{ matrix.arch }}
31-
run: ./gen-cross.sh
31+
run: ./scripts/crossgen.sh
3232
- name: configure
3333
run: meson setup builddir --cross-file cross.txt
3434
- name: Build

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,7 +2659,7 @@ target/release/csr -> ~2MB (release, stripped)
26592659

26602660
## Installation
26612661

2662-
All build systems auto-detect `x86_64`/`aarch64` and select the correct musl target. Cross-compilation files are in `env.mk`, `toolchain.cmake`, and `cross.txt` (generated via `gen-cross.sh`).
2662+
All build systems auto-detect `x86_64`/`aarch64` and select the correct musl target. Cross-compilation files are in `env.mk`, `toolchain.cmake`, and `cross.txt` (generated via `scripts/crossgen.sh`).
26632663

26642664
### Cargo (direct)
26652665

@@ -2682,7 +2682,7 @@ make install DESTDIR=/mnt # staged install
26822682
### Meson
26832683

26842684
```shell
2685-
./gen-cross.sh # generate cross file for host arch
2685+
./scripts/crossgen.sh # generate cross file for host arch
26862686
meson setup builddir --cross-file cross.txt --prefix=/system
26872687
meson compile -C builddir
26882688
meson install -C builddir

cross.txt

Lines changed: 0 additions & 22 deletions
This file was deleted.

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ project('cesar', 'rust',
77
],
88
)
99

10-
gen_cross = find_program('gen-cross.sh')
10+
gen_cross = find_program('scripts/crossgen.sh')
1111
run_command(gen_cross, check : true)
1212

1313
cpu = host_machine.cpu_family()

gen-cross.sh renamed to scripts/crossgen.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
2-
# gen-cross.sh — Generate Meson cross-file for MCX with auto-detection
3-
# Usage: ./gen-cross.sh [output_path]
2+
# scripts/crossgen.sh — Generate Meson cross-file for MCX with auto-detection
3+
# Usage: ./scripts/crossgen.sh [output_path]
44
set -e
55

66
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
@@ -31,7 +31,7 @@ cpp = 'clang++'
3131
ar = 'llvm-ar'
3232
strip = 'llvm-strip'
3333
rust = 'rustc'
34-
pkg-config = '${SCRIPT_DIR}/pkgconfig.sh'
34+
pkg-config = '${SCRIPT_DIR}/scripts/pkgconfig.sh'
3535
3636
[properties]
3737
sys_root = '${SYSROOT}'
File renamed without changes.

0 commit comments

Comments
 (0)