Skip to content

Commit

Permalink
fix musl build
Browse files Browse the repository at this point in the history
  • Loading branch information
ForsakenHarmony committed Mar 6, 2024
1 parent 60337ff commit a4327c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 27 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/lsp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- host: ubuntu-latest
target: "aarch64-unknown-linux-musl"
rust-build-env: 'CC_aarch64_unknown_linux_musl=clang AR_aarch64_unknown_linux_musl=llvm-ar RUSTFLAGS="-Clink-self-contained=yes -Clinker=rust-lld"'
setup: "sudo apt-get update && sudo apt-get install -y build-essential musl-tools clang llvm gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu"
setup: "sudo apt-get update && sudo apt-get install -y crossbuild-essential-arm64 musl-tools clang llvm"
- host: windows-latest
target: x86_64-pc-windows-msvc
- host: windows-latest
Expand All @@ -48,15 +48,6 @@ jobs:
if: ${{ matrix.settings.setup }}
run: ${{ matrix.settings.setup }}

- name: Print Rust toolchain
shell: bash
run: |
rustup show
which cargo
cargo --version --verbose
which rustc
rustc --version --verbose
- name: Build
shell: bash
run: ${{ matrix.settings.rust-build-env }} cargo build --profile release-turborepo-lsp -p turborepo-lsp --target ${{ matrix.settings.target }}
Expand Down
22 changes: 5 additions & 17 deletions .github/workflows/turborepo-library-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,15 @@ jobs:
target: "x86_64-unknown-linux-musl"
setup: |
sudo apt update
sudo apt install -y musl-dev
sudo apt install -y musl-tools
- host: ubuntu-latest
target: "aarch64-unknown-linux-musl"
setup: |
sudo apt update
sudo apt install -y crossbuild-essential-arm64 musl-dev
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
echo "CC_aarch64_unknown_linux_musl=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
echo "CXX_aarch64_unknown_linux_musl=aarch64-linux-gnu-g++" >> $GITHUB_ENV
rust_env: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc RUSTFLAGS="-Ctarget-feature=-crt-static"

sudo apt install -y crossbuild-essential-arm64 musl-tools clang llvm
rust_env: 'CC_aarch64_unknown_linux_musl=clang AR_aarch64_unknown_linux_musl=llvm-ar RUSTFLAGS="-Clink-self-contained=yes -Clinker=rust-lld"
'
- host: windows-latest
target: "aarch64-pc-windows-msvc"

Expand All @@ -76,15 +73,6 @@ jobs:
run: ${{ matrix.settings.setup }}
if: ${{ matrix.settings.setup }}

- name: Print Rust toolchain
shell: bash
run: |
rustup show
which cargo
cargo --version --verbose
which rustc
rustc --version --verbose
- name: Build native library
shell: bash
run: |
Expand Down

0 comments on commit a4327c3

Please sign in to comment.