This is an archive of the discontinued LLVM Phabricator instance.

[PATCH] [PATCH] Enable targeting riscv64-linux-android
ClosedPublic

Authored by hiraditya on Mar 21 2023, 1:18 PM.

Diff Detail

Event Timeline

hiraditya created this revision.Mar 21 2023, 1:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2023, 1:18 PM
hiraditya requested review of this revision.Mar 21 2023, 1:18 PM
enh accepted this revision.Mar 21 2023, 1:43 PM
enh added inline comments.
clang/lib/Driver/ToolChains/Linux.cpp
95–96

(we should remove this and mips64 at some point...)

This revision is now accepted and ready to land.Mar 21 2023, 1:43 PM
srhines accepted this revision.Mar 21 2023, 2:06 PM
phosek added inline comments.Mar 21 2023, 2:07 PM
clang/lib/Driver/ToolChains/Linux.cpp
129–130

Is there a test that covers this function? If yes, it should be updated to also cover this branch. If no, then we should consider introducing one (although that could be done in a separate change).

hiraditya added inline comments.Mar 21 2023, 2:27 PM
clang/lib/Driver/ToolChains/Linux.cpp
95–96

will do in a follow up patch. thanks!

129–130

good point. i'll update/add testcase as appropriate in a separate patch. Thanks for bringing this up.

phosek accepted this revision.Mar 21 2023, 2:29 PM

LGTM

MaskRay added inline comments.Mar 21 2023, 8:23 PM
clang/lib/Driver/ToolChains/Linux.cpp
129–130

This function is a gloss hack for Debian style multiarch library paths (there is no "vendor" part in the target triples). It's frowned upon and the code is somehow shared with Android as well. It'd be best if Android can move away touching this function.

You may try removing Android customization and see what may break.

enh added inline comments.Mar 22 2023, 7:43 AM
clang/lib/Driver/ToolChains/Linux.cpp
129–130

we use this to specify what target api level you're targeting. so a developer will say "x86-linux-android28" or whatever. (we're effectively "multiarch" ourselves, but more so, because we have a new one every year.)

This revision was landed with ongoing or failed builds.Mar 23 2023, 1:34 PM
This revision was automatically updated to reflect the committed changes.
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 23 2023, 1:34 PM
Herald added subscribers: Restricted Project, cfe-commits. · View Herald Transcript