diff --git a/.cargo/config.toml b/.cargo/config.toml index aea7314b..516338ce 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -16,4 +16,9 @@ linker = "aarch64-linux-musl-gcc" # user-visible impacts on the final executables. See: # https://github.com/rust-lang/rust/issues/46651 # https://github.com/rust-lang/compiler-builtins/issues/201 +# https://github.com/rust-lang/rust/issues/128401 (the issue most relevant to +# our observed failures) +# Note that these flags are not enforced on CI because CI overrides them through +# the RUSTFLAG environment variable. Check out the CI workflow definition file at +# .github/workflows/oxipng.yml for more info rustflags = ["-Clink-args=-lgcc"] diff --git a/.github/workflows/oxipng.yml b/.github/workflows/oxipng.yml index 72626c99..1f7a9664 100644 --- a/.github/workflows/oxipng.yml +++ b/.github/workflows/oxipng.yml @@ -55,7 +55,9 @@ jobs: env: CARGO_BUILD_TARGET: ${{ matrix.target }} - RUSTFLAGS: -Zlocation-detail=none + # Hopefully temporary workaround for https://github.com/rust-lang/rust/issues/128401 + # See the comments for similar rustflag settings at .cargo/config.toml for more context + RUSTFLAGS: ${{ matrix.target == 'aarch64-unknown-linux-musl' && '-Zlocation-detail=none -Clink-args=-lgcc' || '-Zlocation-detail=none' }} steps: - name: Checkout source