mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
ci: freebsd: don't try to compile with zig cc
This commit is contained in:
parent
a680c7ba98
commit
996193c228
@ -14,13 +14,6 @@ cd $HOME
|
||||
wget -nv "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz"
|
||||
tar xf "$CACHE_BASENAME.tar.xz"
|
||||
|
||||
ZIG="$PREFIX/bin/zig"
|
||||
NATIVE_LIBC_TXT="$HOME/native_libc.txt"
|
||||
$ZIG libc > "$NATIVE_LIBC_TXT"
|
||||
export ZIG_LIBC="$NATIVE_LIBC_TXT"
|
||||
export CC="$ZIG cc"
|
||||
export CXX="$ZIG c++"
|
||||
|
||||
cd $ZIGDIR
|
||||
|
||||
# Make the `zig version` number consistent.
|
||||
@ -41,22 +34,8 @@ cmake .. \
|
||||
-DCMAKE_PREFIX_PATH=$PREFIX \
|
||||
"-DCMAKE_INSTALL_PREFIX=$(pwd)/release" \
|
||||
-DZIG_STATIC=ON \
|
||||
-DZIG_TARGET_TRIPLE="x86_64-native-gnu" \
|
||||
-DZIG_TARGET_MCPU="baseline" \
|
||||
-DZIG_TARGET_TRIPLE=x86_64-freebsd-gnu \
|
||||
-GNinja
|
||||
|
||||
# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
|
||||
# so that installation and testing do not get affected by them.
|
||||
unset CC
|
||||
unset CXX
|
||||
unset ZIG_LIBC
|
||||
|
||||
samu install
|
||||
|
||||
# Here we rebuild zig but this time using the Zig binary we just now produced to
|
||||
# build zig1.o rather than relying on the one built with stage0. See
|
||||
# https://github.com/ziglang/zig/issues/6830 for more details.
|
||||
cmake .. -DZIG_EXECUTABLE="$(pwd)/release/bin/zig" -DZIG_TARGET_MCPU="x86_64_v2"
|
||||
samu install
|
||||
|
||||
# Here we skip some tests to save time.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user