Skip to content

Incorrect builtins are exposed for offload targets #64436

Open
@AaronBallman

Description

When using -aux-triple for an offload target, the incorrect builtins are being exposed. The builtins exposed are not based on the target specified. e.g,

static_assert(__has_builtin(__cpuidex), "uh oh");

will not fail when given: -c -fopenmp -Xclang -fopenmp-is-target-device -Xclang -aux-triple -Xclang x86_64-unknown-linux-gnu, but it should fail because that's a Windows-specific builtin. Removing the -aux-triple will cause the assertion to trigger as expected.

https://godbolt.org/z/sbMjjer16

Activity

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

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorclang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions