Skip to content
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

Add 32-bit ARM support (armeabi and armeabi-v7a) #199

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

monzeromer-lab
Copy link

@monzeromer-lab monzeromer-lab commented Dec 22, 2024

Closes #195

I think now builds for 32-bit ARMv7 Android (armeabi-v7a) is possible, I tested it manually, so yes, testing is missing still. Use x build --platform android --arch armv7 for armv7 or --arch arm which will use androideabi.

This is my first ever contribution, So yes, I don't know what I'm doing.

let me know what I'm doing wrong so I can make sure everything is good to go.

Copy link
Member

@MarijnS95 MarijnS95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! If you don't mind I'll first merge some other PRs that fix clippy lints and simplify the implementation for these enums. After that, we can rebase this and take a closer look.

Perhaps some CI tests for this architecture are useful, see how we do it for the other targets.

Comment on lines 128 to +132
match self.getkey(device, "CPUArchitecture")?.as_str() {
"arm64" | "arm64e" => Ok(Arch::Arm64),
"armv7" => Ok(Arch::Armv7),
"arm" => Ok(Arch::Arm),
"x86_64" => Ok(Arch::X64),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is iOS code, did you confirm that it returns x86_64?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly didn't know what this does in first place

Comment on lines 4 to +10
#[repr(u8)]
pub enum Target {
ArmV7a = 1,
Arm64V8a = 2,
X86 = 3,
X86_64 = 4,
Armeabi = 2,
Arm64V8a = 3,
X86 = 4,
X86_64 = 5,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the repr values here might not be desired, but I need to check where it is even used.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright

@MarijnS95 MarijnS95 changed the title added arm 32bit support Add 32-bit armeabi and armeabi-v7a support Dec 23, 2024
@MarijnS95 MarijnS95 changed the title Add 32-bit armeabi and armeabi-v7a support Add 32-bit ARM support (armeabi and armeabi-v7a) Dec 23, 2024
@monzeromer-lab
Copy link
Author

Thanks! If you don't mind I'll first merge some other PRs that fix clippy lints and simplify the implementation for these enums. After that, we can rebase this and take a closer look.

Perhaps some CI tests for this architecture are useful, see how we do it for the other targets.

Sure, no problem.

will add it.

@MarijnS95
Copy link
Member

Looks like both tests are failing, so it's definitely good that we have them to catch things early as that means more work is required before this is ready.

@monzeromer-hub
Copy link

monzeromer-hub commented Dec 23, 2024

Looks like both tests are failing, so it's definitely good that we have them to catch things early as that means more work is required before this is ready.

Yes, some package trowed an error in some type mismatch, and armv7 had unsupported sdk version, how do I change it btw, and in macos one failed for missing lld linker.

I noticed there's almost no doc for the tool yet, I think I can work on that too.

@monzeromer-lab

This comment was marked as off-topic.

@MarijnS95

This comment was marked as off-topic.

@MarijnS95
Copy link
Member

Yes, some package trowed an error in some type mismatch, and armv7 had unsupported sdk version, how do I change it btw, and in macos one failed for missing lld linker.

When I mentioned "If you don't mind I'll first merge some other PRs that fix clippy lints" above, I meant #198 which will fix these issues. There's still one more problem to go, after which you can rebase on top and the CI should only focus on the resulting changes from adding 32-bit ARM support.

@MarijnS95
Copy link
Member

@monzeromer-hub / @monzeromer-lab the relevant CI fixes have been merged, you can rebase now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants