From b52a4b7c1f5ee7d65f6a918d5c5f9cf5868fe04a Mon Sep 17 00:00:00 2001 From: Sean Moriarity Date: Mon, 10 Oct 2022 06:33:55 -0700 Subject: [PATCH 1/3] Add aarch64-unknown-linux-musl to release targets --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5233a33..f084c7a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,6 +36,7 @@ jobs: features: "static_openssl", } - { target: aarch64-unknown-linux-gnu, os: ubuntu-20.04, nif: "2.16", use-cross: true } + - { target: aarch64-unknown-linux-musl, os: ubuntu-20.04, nif: "2.16", use-cross: true, features: "static_openssl" } - { target: aarch64-apple-darwin, os: macos-11, nif: "2.16" } - { target: x86_64-apple-darwin, os: macos-11, nif: "2.16" } - { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04, nif: "2.16" } @@ -51,6 +52,7 @@ jobs: features: "static_openssl", } - { target: aarch64-unknown-linux-gnu, os: ubuntu-20.04, nif: "2.15", use-cross: true } + - { target: aarch64-unknown-linux-musl, os: ubuntu-20.04, nif: "2.15", use-cross: true, features: "static_openssl" } - { target: aarch64-apple-darwin, os: macos-11, nif: "2.15" } - { target: x86_64-apple-darwin, os: macos-11, nif: "2.15" } - { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04, nif: "2.15" } @@ -66,6 +68,7 @@ jobs: features: "static_openssl", } - { target: aarch64-unknown-linux-gnu, os: ubuntu-20.04, nif: "2.14", use-cross: true } + - { target: aarch64-unknown-linux-musl, os: ubuntu-20.04, nif: "2.14", use-cross: true, features: "static_openssl" } - { target: aarch64-apple-darwin, os: macos-11, nif: "2.14" } - { target: x86_64-apple-darwin, os: macos-11, nif: "2.14" } - { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04, nif: "2.14" } From b7957648eec927e4cbf7bdbbf24bcddb23d47c1f Mon Sep 17 00:00:00 2001 From: Sean Moriarity Date: Mon, 10 Oct 2022 06:53:07 -0700 Subject: [PATCH 2/3] Add rust flags --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f084c7a..164ac63 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,7 @@ jobs: features: "static_openssl", } - { target: aarch64-unknown-linux-gnu, os: ubuntu-20.04, nif: "2.16", use-cross: true } - - { target: aarch64-unknown-linux-musl, os: ubuntu-20.04, nif: "2.16", use-cross: true, features: "static_openssl" } + - { target: aarch64-unknown-linux-musl, os: ubuntu-20.04, nif: "2.16", use-cross: true, features: "static_openssl", rust_flags: "-C target-feature=-crt-static" } - { target: aarch64-apple-darwin, os: macos-11, nif: "2.16" } - { target: x86_64-apple-darwin, os: macos-11, nif: "2.16" } - { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04, nif: "2.16" } @@ -52,7 +52,7 @@ jobs: features: "static_openssl", } - { target: aarch64-unknown-linux-gnu, os: ubuntu-20.04, nif: "2.15", use-cross: true } - - { target: aarch64-unknown-linux-musl, os: ubuntu-20.04, nif: "2.15", use-cross: true, features: "static_openssl" } + - { target: aarch64-unknown-linux-musl, os: ubuntu-20.04, nif: "2.15", use-cross: true, features: "static_openssl", rust_flags: "-C target-feature=-crt-static" } - { target: aarch64-apple-darwin, os: macos-11, nif: "2.15" } - { target: x86_64-apple-darwin, os: macos-11, nif: "2.15" } - { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04, nif: "2.15" } @@ -68,7 +68,7 @@ jobs: features: "static_openssl", } - { target: aarch64-unknown-linux-gnu, os: ubuntu-20.04, nif: "2.14", use-cross: true } - - { target: aarch64-unknown-linux-musl, os: ubuntu-20.04, nif: "2.14", use-cross: true, features: "static_openssl" } + - { target: aarch64-unknown-linux-musl, os: ubuntu-20.04, nif: "2.14", use-cross: true, features: "static_openssl", rust_flags: "-C target-feature=-crt-static" } - { target: aarch64-apple-darwin, os: macos-11, nif: "2.14" } - { target: x86_64-apple-darwin, os: macos-11, nif: "2.14" } - { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04, nif: "2.14" } @@ -122,7 +122,7 @@ jobs: shell: bash run: | if [ "${{ matrix.job.use-cross }}" == "true" ]; then - cross build --release --target=${{ matrix.job.target }} --features=${{ matrix.job.features }} + RUSTFLAGS=${{ matrix.job.rust_flags }} cross build --release --target=${{ matrix.job.target }} --features=${{ matrix.job.features }} else cargo build --release --target=${{ matrix.job.target }} --features=${{ matrix.job.features }} fi From 9524233a83d709543b4ad55e321914caef3486bb Mon Sep 17 00:00:00 2001 From: Sean Moriarity Date: Mon, 10 Oct 2022 08:25:47 -0700 Subject: [PATCH 3/3] Add rustflags to config --- .github/workflows/release.yml | 8 ++++---- native/ex_tokenizers/.cargo/config | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 164ac63..f084c7a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,7 @@ jobs: features: "static_openssl", } - { target: aarch64-unknown-linux-gnu, os: ubuntu-20.04, nif: "2.16", use-cross: true } - - { target: aarch64-unknown-linux-musl, os: ubuntu-20.04, nif: "2.16", use-cross: true, features: "static_openssl", rust_flags: "-C target-feature=-crt-static" } + - { target: aarch64-unknown-linux-musl, os: ubuntu-20.04, nif: "2.16", use-cross: true, features: "static_openssl" } - { target: aarch64-apple-darwin, os: macos-11, nif: "2.16" } - { target: x86_64-apple-darwin, os: macos-11, nif: "2.16" } - { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04, nif: "2.16" } @@ -52,7 +52,7 @@ jobs: features: "static_openssl", } - { target: aarch64-unknown-linux-gnu, os: ubuntu-20.04, nif: "2.15", use-cross: true } - - { target: aarch64-unknown-linux-musl, os: ubuntu-20.04, nif: "2.15", use-cross: true, features: "static_openssl", rust_flags: "-C target-feature=-crt-static" } + - { target: aarch64-unknown-linux-musl, os: ubuntu-20.04, nif: "2.15", use-cross: true, features: "static_openssl" } - { target: aarch64-apple-darwin, os: macos-11, nif: "2.15" } - { target: x86_64-apple-darwin, os: macos-11, nif: "2.15" } - { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04, nif: "2.15" } @@ -68,7 +68,7 @@ jobs: features: "static_openssl", } - { target: aarch64-unknown-linux-gnu, os: ubuntu-20.04, nif: "2.14", use-cross: true } - - { target: aarch64-unknown-linux-musl, os: ubuntu-20.04, nif: "2.14", use-cross: true, features: "static_openssl", rust_flags: "-C target-feature=-crt-static" } + - { target: aarch64-unknown-linux-musl, os: ubuntu-20.04, nif: "2.14", use-cross: true, features: "static_openssl" } - { target: aarch64-apple-darwin, os: macos-11, nif: "2.14" } - { target: x86_64-apple-darwin, os: macos-11, nif: "2.14" } - { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04, nif: "2.14" } @@ -122,7 +122,7 @@ jobs: shell: bash run: | if [ "${{ matrix.job.use-cross }}" == "true" ]; then - RUSTFLAGS=${{ matrix.job.rust_flags }} cross build --release --target=${{ matrix.job.target }} --features=${{ matrix.job.features }} + cross build --release --target=${{ matrix.job.target }} --features=${{ matrix.job.features }} else cargo build --release --target=${{ matrix.job.target }} --features=${{ matrix.job.features }} fi diff --git a/native/ex_tokenizers/.cargo/config b/native/ex_tokenizers/.cargo/config index 082078b..e154738 100644 --- a/native/ex_tokenizers/.cargo/config +++ b/native/ex_tokenizers/.cargo/config @@ -14,3 +14,8 @@ rustflags = [ rustflags = [ "-C", "target-feature=-crt-static" ] + +[target.aarch64-unknown-linux-musl] +rustflags = [ + "-C", "target-feature=-crt-static" +] \ No newline at end of file