Skip to content

[BUG] error: PCH file was compiled for the target 'aarch64-unknown-linux-android21' but the current translation unit is being compiled for target 'aarch64-none-linux-android21' #2263

Open

Description

@leleliu008

Description

Android NDK Toolchain cmake has set:

set(ANDROID_LLVM_TRIPLE aarch64-none-linux-android)
set(ANDROID_LLVM_TRIPLE x86_64-none-linux-android)

I don't known why use -none- rather than -unknown-

CMake will automatically inject the --taregt=$ANDROID_LLVM_TRIPLE parameter to clang.

If user also pass --taregt=aarch64-linux-android21 and use with clang-scan-deps, it will report this error.

clang treat --taregt=aarch64-linux-android21 as --taregt=aarch64-unknown-linux-android21 rather than --taregt=aarch64-none-linux-android21

I am using a supported NDK

  • I have checked and the NDK I'm using is currently supported

Affected versions

r27, r29, r28, r30

Activity

  1. self-assigned this
    on Nov 2, 2026
  2. moved this from Unconfirmed to No status in NDK r31on Nov 3, 2026
  3. moved this to Triaged in NDK r31on Nov 3, 2026
  4. moved this from Triaged to Needs cherry-pick in NDK r31on Nov 3, 2026
  5. Sharjeel-Khan commented on Nov 3, 2026

    @Sharjeel-Khan
    Collaborator

    We have updated all -none-linux-android in our configurations to -linux-android and this fix will land both in NDK r30b and NDK r31 Beta1.

  6. moved this from Needs cherry-pick to Merged in NDK r31on Nov 3, 2026
  7. Sharjeel-Khan commented on Dec 1, 2026

    @Sharjeel-Khan
    Collaborator

    NDK r31 Beta 1 released today and has fix for this but I will keep the issue open until r30b also includes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

  • Status
    Merged

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions