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

Target: add OpenHarmonyOS ABI #20011

Merged
merged 1 commit into from
May 20, 2024
Merged

Target: add OpenHarmonyOS ABI #20011

merged 1 commit into from
May 20, 2024

Conversation

Vexu
Copy link
Member

@Vexu Vexu commented May 20, 2024

Should match how Clang/LLVM handle it but I haven't tested it.

Closes #20009

@@ -45,7 +45,8 @@ pub fn requiresPIC(target: std.Target, linking_libc: bool) bool {
return target.isAndroid() or
target.os.tag == .windows or target.os.tag == .uefi or
osRequiresLibC(target) or
(linking_libc and target.isGnuLibC());
(linking_libc and target.isGnuLibC()) or
(target.abi == .ohos and target.cpu.arch == .aarch64);

Choose a reason for hiding this comment

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

Openharmony support arm64-v8a armeabi-v7a x86_64, so should we remove target.cpu.arch == .aarch64 ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

ok thanks for your work, i will try to test it.

@andrewrk
Copy link
Member

Nice, thanks!

@andrewrk andrewrk merged commit 8aae0d8 into ziglang:master May 20, 2024
10 checks passed
@Vexu Vexu deleted the ohos branch May 20, 2024 13:49
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.

How about to support openharmony target
3 participants