mirror of
https://github.com/denoland/rusty_v8.git
synced 2025-01-05 22:09:18 -05:00
musl libc builds
This commit is contained in:
parent
b0364c0c5e
commit
554f922db3
2 changed files with 44 additions and 0 deletions
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
|
@ -207,6 +207,15 @@ jobs:
|
|||
${{ matrix.config.cargo }} clippy --all-targets --locked ${{ env.CARGO_VARIANT_FLAG }}
|
||||
--target ${{ matrix.config.target }} -- -D clippy::all
|
||||
|
||||
- name: Build Musl
|
||||
if: matrix.config.target == 'x86_64-unknown-linux-gnu'
|
||||
run: |
|
||||
docker run -v "$PWD":/usr/src/rusty_v8 -w /usr/src/rusty_v8 rust:alpine3.16 ./musl-build.sh
|
||||
cp target/${{ matrix.config.variant }}/gn_out/obj/librusty_v8.a target/librusty_v8_${{ matrix.config.variant }}_x86_64-unknown-linux-musl.a
|
||||
|
||||
- name: Rustfmt
|
||||
run: cargo fmt -- --check
|
||||
|
||||
- name: Prepare binary publish
|
||||
if: matrix.config.variant == 'debug' || matrix.config.variant == 'release'
|
||||
run: |
|
||||
|
|
35
musl-build.sh
Executable file
35
musl-build.sh
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh
|
||||
|
||||
apk add git \
|
||||
gcc \
|
||||
ninja \
|
||||
python3 \
|
||||
clang \
|
||||
g++ \
|
||||
pkgconfig \
|
||||
glib-dev \
|
||||
llvm13-dev \
|
||||
binutils-gold \
|
||||
sccache
|
||||
ln -s /usr/bin/python3 /usr/bin/python
|
||||
|
||||
export V8_FROM_SOURCE="yes"
|
||||
export CLANG_BASE_PATH="/usr"
|
||||
export SCCACHE_DIR="./target/sccache"
|
||||
export SCCACHE="/usr/bin/sccache"
|
||||
export GN_ARGS="use_custom_libcxx=false use_lld=false v8_enable_backtrace=false v8_enable_debugging_features=false"
|
||||
GN="$(pwd)/gn/out/gn"
|
||||
export GN
|
||||
|
||||
# Bulid GN
|
||||
if [ ! -d "./gn" ]; then
|
||||
git clone https://gn.googlesource.com/gn
|
||||
(
|
||||
cd gn || exit
|
||||
python3 build/gen.py
|
||||
ninja -C out
|
||||
)
|
||||
fi
|
||||
|
||||
# Build rusty_v8
|
||||
cargo build -vv
|
Loading…
Reference in a new issue