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

Fix linker detection for linker (drivers) with a version postfix (e.g. clang-12 instead of clang) #106489

Merged
merged 1 commit into from
Jan 14, 2023

Commits on Jan 13, 2023

  1. Improve linker-flavor detection

    Linker drivers such as gcc, clang or lld often have a version postfix,
    e.g clang-12. The previous logic would not account for this and would
    fall back to guessing the linker flavor to be the default linker flavor
    for the target, which causes linker errors when this is not the case.
    By accounting for the possible version postfix and also considering
    g++ and clang++, we considerably reduce the amount of times the
    fallback guess has to be used.
    
    To simplify matching check for a version postfix and match against the
    linker stem without any version postfix.
    In contrast to gcc, clang supports all architectures in one binary.
    This means there are no variants like `aarch64-linux-gnu-clang` and
    there is no need to check for `-clang` variants.
    jschwe committed Jan 13, 2023
    Configuration menu
    Copy the full SHA
    3bc2970 View commit details
    Browse the repository at this point in the history