mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-02 10:52:57 +02:00
common/build-style/zig-build: adjust sysroot and search path for zig 0.14
This commit is contained in:
parent
c14203c3b1
commit
60fed86b5f
1 changed files with 5 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
do_build() {
|
do_build() {
|
||||||
local zig_target zig_cpu
|
local zig_target zig_cpu zig_search_prefix
|
||||||
|
|
||||||
# TODO: This duplication between build-profiles and cross-profiles
|
# TODO: This duplication between build-profiles and cross-profiles
|
||||||
# is totally unnecessary. It would be nice if there was some way to
|
# is totally unnecessary. It would be nice if there was some way to
|
||||||
|
@ -7,9 +7,11 @@ do_build() {
|
||||||
if [ "$CROSS_BUILD" ]; then
|
if [ "$CROSS_BUILD" ]; then
|
||||||
zig_target="${XBPS_CROSS_ZIG_TARGET}"
|
zig_target="${XBPS_CROSS_ZIG_TARGET}"
|
||||||
zig_cpu="${XBPS_CROSS_ZIG_CPU}"
|
zig_cpu="${XBPS_CROSS_ZIG_CPU}"
|
||||||
|
zig_search_prefix=/
|
||||||
else
|
else
|
||||||
zig_target="${XBPS_ZIG_TARGET}"
|
zig_target="${XBPS_ZIG_TARGET}"
|
||||||
zig_cpu="${XBPS_ZIG_CPU}"
|
zig_cpu="${XBPS_ZIG_CPU}"
|
||||||
|
zig_search_prefix=/usr
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Inform zig of the required libc include paths.
|
# Inform zig of the required libc include paths.
|
||||||
|
@ -30,8 +32,8 @@ do_build() {
|
||||||
# prefix used by the zig build system.
|
# prefix used by the zig build system.
|
||||||
DESTDIR="zig-out" zig build \
|
DESTDIR="zig-out" zig build \
|
||||||
-j"${XBPS_MAKEJOBS}" \
|
-j"${XBPS_MAKEJOBS}" \
|
||||||
--sysroot "${XBPS_CROSS_BASE}" \
|
--sysroot "${XBPS_CROSS_BASE:-/}" \
|
||||||
--search-prefix "${XBPS_CROSS_BASE}/usr" \
|
--search-prefix "${zig_search_prefix}" \
|
||||||
--prefix /usr \
|
--prefix /usr \
|
||||||
--global-cache-dir /host/zig \
|
--global-cache-dir /host/zig \
|
||||||
--libc xbps_zig_libc.txt \
|
--libc xbps_zig_libc.txt \
|
||||||
|
|
Loading…
Add table
Reference in a new issue