Skip to content

cargo-apk,ndk-build: Move NDK r23 -lgcc workaround to cargo_ndk to reuse in -- subcommand#286

Merged
MarijnS95 merged 1 commit intomasterfrom
move-lgcc-workaround-to-ndk-build
Jun 10, 2022
Merged

cargo-apk,ndk-build: Move NDK r23 -lgcc workaround to cargo_ndk to reuse in -- subcommand#286
MarijnS95 merged 1 commit intomasterfrom
move-lgcc-workaround-to-ndk-build

Conversation

@MarijnS95
Copy link
Member

Winit is currently being hit by -lgcc not found linker errors because GH Actions' virtual-environments recently migrated to Android NDK r23, and it turns out it's using the niche -- subcommand to invoke regular cargo commands under an NDK environment.

The workaround using RUSTFLAGS is only patched into the build() command; by moving it into our cargo_ndk() environment preparation function this workaround is universally available and usable.

Note that this is a breaking change, we're changing the API signature of ndk-build.

…o reuse in `--` subcommand

Winit is currently being hit by `-lgcc not found` linker errors because
GH Actions' [virtual-environments recently migrated to Android NDK r23],
and it turns out it's using the niche `--` subcommand to invoke regular
`cargo` commands under an NDK environment.

The workaround using `RUSTFLAGS` is only patched into the `build()`
command; by moving it into our `cargo_ndk()` environment preparation
function this workaround is universally available and usable.

Note that this is a breaking change, we're changing the API signature of
`ndk-build`.

[virtual-environments recently migrated to Android NDK r23]: actions/runner-images#5595
@MarijnS95 MarijnS95 force-pushed the move-lgcc-workaround-to-ndk-build branch from 4c96a28 to 4dd596d Compare June 10, 2022 16:14
@msiglreith
Copy link
Contributor

seems to work locally with ndk-r24 👍

@MarijnS95 MarijnS95 merged commit 9ff0d10 into master Jun 10, 2022
@MarijnS95 MarijnS95 deleted the move-lgcc-workaround-to-ndk-build branch June 10, 2022 17:16
@MarijnS95 MarijnS95 added the type: bug Dang, that shouldn't have happened label Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Dang, that shouldn't have happened

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants