Skip to content

Commit

Permalink
clang
Browse files Browse the repository at this point in the history
  • Loading branch information
ijl committed Dec 4, 2023
1 parent 9b230c9 commit 8bf6290
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,40 +195,46 @@ jobs:
{
arch: 'aarch64',
target: 'aarch64-unknown-linux-gnu',
cflags: '-O2',
cflags: '-O2 -fno-plt -flto=thin',
rustflags: '-C linker=clang -C linker-plugin-lto -C link-arg=-fuse-ld=lld -C link-args=-s -D warnings',
},
{
arch: 'armv7',
target: 'armv7-unknown-linux-gnueabihf',
cflags: '-Os -fstrict-aliasing',
cflags: '-Os -fno-plt -flto=thin -fstrict-aliasing',
rustflags: '-C linker=clang -C linker-plugin-lto -C link-arg=-fuse-ld=lld -C link-args=-s -D warnings',
},
{
arch: 'ppc64le',
target: 'powerpc64le-unknown-linux-gnu',
cflags: '-O2',
cflags: '-O2 -fno-plt -flto=thin',
rustflags: '-C linker=clang -C linker-plugin-lto -C link-arg=-fuse-ld=lld -C link-args=-s -D warnings',
},
{
arch: 's390x',
target: 's390x-unknown-linux-gnu',
cflags: '-O2 -march=z10',
cflags: '-O2 -fno-plt -flto=thin -march=z10',
rustflags: '-C linker=clang -C linker-plugin-lto -C link-arg=-fuse-ld=lld -C link-args=-s -D warnings',
},
]
steps:
- uses: actions/checkout@v4

- name: build-std
run: |
mkdir .cargo
cp ci/config.toml .cargo/config.toml
- name: Build
uses: PyO3/maturin-action@v1
uses: PyO3/maturin-action@v1.40.8
env:
CC: "clang"
PYO3_CROSS_LIB_DIR: "/opt/python/${{ matrix.python.abi }}"
CFLAGS: "${{ matrix.target.cflags }}"
LDFLAGS: "${{ matrix.target.cflags }} -flto -Wl,--as-needed"
LDFLAGS: "${{ matrix.target.cflags }} -Wl,--as-needed"
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
RUSTFLAGS: "${{ matrix.target.rustflags }}"
with:
before-script-linux: apt-get update && apt-get install -y clang lld
target: ${{ matrix.target.target }}
rust-toolchain: nightly-2023-11-15
rustup-components: rust-src
Expand Down

0 comments on commit 8bf6290

Please sign in to comment.