Skip to content

Conversation

xxuejie
Copy link
Collaborator

@xxuejie xxuejie commented Dec 26, 2024

Different distros package LLVM / clang into different setups:

  • Fedora 41's clang package provides clang, clang-19 and llvm-ar
  • Ubuntu 24.04's clang package provides clang, clang-18 and llvm-ar-18

Previously, we rely on clang's binary name to infer names for other binaries. But given the above packaging reality, relying on binary clang introduces ambiguity.

This commit changes the code so we now rely on another binary, such as llvm-strip or llvm-strip-18 to detect the suffix, and then piece together the binary names we will invoke.

Different distros package LLVM / clang into different setups:
* Fedora 41's clang package provides clang, clang-19 and llvm-ar
* Ubuntu 24.04's clang package provides clang, clang-18 and llvm-ar-18

Previously, we rely on clang's binary name to infer names for other
binaries. But given the above packaging reality, relying on binary
clang introduces ambiguity.

This commit changes the code so we now rely on another binary, such
as llvm-strip or llvm-strip-18 to detect the suffix, and then piece
together the binary names we will invoke.
@xxuejie xxuejie force-pushed the find-clang-via-another-bin branch from 5abfe31 to 3248934 Compare December 30, 2024 04:53
@xxuejie xxuejie requested review from XuJiandong and quake December 30, 2024 05:35
@xxuejie xxuejie merged commit 81e813d into main Dec 31, 2024
8 checks passed
@xxuejie xxuejie deleted the find-clang-via-another-bin branch December 31, 2024 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants