Skip to content

Commit

Permalink
clang
Browse files Browse the repository at this point in the history
  • Loading branch information
ijl committed Dec 1, 2023
1 parent 9b230c9 commit 41cb0d0
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,27 +195,30 @@ 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
Expand All @@ -224,11 +227,14 @@ jobs:
- name: Build
uses: PyO3/maturin-action@v1
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 41cb0d0

Please sign in to comment.