-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[native_toolchain_c] Setup Android RISCV64 toolchain. #165
Conversation
The failing tests are about Target.androidRiscv64 not being defined, but it is defined in this PR. Possibly the tests for native_toolchain_c are not using the version of native_assets_cli in this repository? |
They don't have path dependencies on each other, they have dependencies via a published version on pub on each other. |
So this PR needs to be split into two PRs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for native_assets_cli changes (which need to land first)
@@ -38,6 +38,7 @@ class Architecture { | |||
Abi.androidArm64: Architecture.arm64, | |||
Abi.androidIA32: Architecture.ia32, | |||
Abi.androidX64: Architecture.x64, | |||
Abi.androidRiscv64: Architecture.riscv64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file needs to be it's own PR + a version bump to 0.3.1 so that it can be published before the native_toolchain_c PR.
Hm, actually, maybe this is premature because it would require a canary NDK to test and I'm not sure how the GitHub actions testing gets its NDK. |
native/.github/workflows/dart.yaml Lines 47 to 49 in 18bff8c
|
.github/workflows/dart.yaml
Outdated
@@ -46,7 +46,7 @@ jobs: | |||
|
|||
- uses: nttld/setup-ndk@dbacc5871a0fac6eef9a09d2ca86bc8bf79432c3 | |||
with: | |||
ndk-version: r25b | |||
ndk-version: r27 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't work / not available from the source. Only increasing to r26b now.
I'm surprised the tests pass now. Are they only looking for the toolchain binaries but not invoking them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it uses -nostartfiles and links with nothing, so it's okay will all the standard libraries not existing yet :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please file an issue that we should add tests for that on this repo.
Addresses: #165 (comment) This is in line with what CMake does, so it's probably a more reasonable thing to do than `-nostartfiles`. The documentation says the sysroot should be auto-discovered on NDKs newer than 22, but it doesn't seem to break the newer versions, so maybe lets just keep the logic consistent for various NDK versions. We probably need a workaround for #165 temporarily.
Addresses: #165 (comment) This is in line with what CMake does, so it's probably a more reasonable thing to do than `-nostartfiles`. The documentation says the sysroot should be auto-discovered on NDKs newer than 22, but it doesn't seem to break the newer versions, so maybe lets just keep the logic consistent for various NDK versions. We probably need a workaround for #165 temporarily.
@@ -17,20 +17,24 @@ void main() { | |||
Target.androidArm64, | |||
Target.androidIA32, | |||
Target.androidX64, | |||
// TODO(rmacnak): Enable when stable NDK 27 is available. | |||
// Target.androidRiscv64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rmacnak-google Can this PR be landed or are we blocked on having NDK 27?
It looks like that will be only in the new year: https://github.com/android/ndk/wiki#ndk-r27-lts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can land this if you're okay with leaving this test disabled, otherwise we need to wait for NDK 27.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay lets land it then 👍 The changes eyeballed look good.
No description provided.