This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Remove confusing *-linux-android detection with non-android --target=
ClosedPublic

Authored by MaskRay on Sep 23 2021, 8:37 PM.

Details

Summary

These values allow, for example, --target=aarch64 and
--target=aarch64-linux-gnu to detect aarch64-linux-android. This is
confusing. Users should specify --target=aarch64-linux-android to get Android GCC
installation.

Reverts D53463.

Diff Detail

Event Timeline

MaskRay created this revision.Sep 23 2021, 8:37 PM
MaskRay requested review of this revision.Sep 23 2021, 8:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 23 2021, 8:37 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
MaskRay edited the summary of this revision. (Show Details)Sep 23 2021, 8:37 PM

You may need to check whether the Android clang has correct clang -dumpmachine. If not, specify LLVM_HOST_TRIPLE explicitly in CMake.

pirama added a subscriber: nickdesaulniers.

@nickdesaulniers I presume this is still necessary? See https://reviews.llvm.org/D53463 for why we added this. (The Android kernel build does not use the Android triple.)

Sorry, I missed the email for this code review, let me check my filters aren't too agressive.

The Android kernel build does not use the Android triple.

That's no longer the case, so we might as well just wholesale revert D53463 IMO.

nickdesaulniers accepted this revision.Sep 27 2021, 1:14 PM
nickdesaulniers added a subscriber: danalbert.
This revision is now accepted and ready to land.Sep 27 2021, 1:14 PM
danalbert accepted this revision.Sep 27 2021, 1:19 PM
This revision was landed with ongoing or failed builds.Sep 27 2021, 1:28 PM
This revision was automatically updated to reflect the committed changes.
clang/lib/Driver/ToolChains/Gnu.cpp