aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2025-04-02 09:52:27 +0200
committerGitHub <noreply@github.com>2025-04-02 14:52:27 +0700
commitbd788dbf516be98044254336f54b72d077f69771 (patch)
tree65ac88f4318ef7521b6c50d5f5254bccc5ead8f6 /flang/lib/Frontend/CompilerInvocation.cpp
parent8a691cc6157b2c3bc91af767eb1154d7a715562a (diff)
downloadllvm-bd788dbf516be98044254336f54b72d077f69771.zip
llvm-bd788dbf516be98044254336f54b72d077f69771.tar.gz
llvm-bd788dbf516be98044254336f54b72d077f69771.tar.bz2
[AMDGPU] Remove detection of hip runtime for Spack (#133263)
There is special logic to detect the hip runtime when llvm is installed with Spack. It works by matching the install prefix of llvm against `llvm-amdgpu-*` followed by effectively globbing for ``` <llvm dir>/../hip-x.y.z-*/ ``` and checking there is exactly one such directory. I would suggest to remove autodetection for the following reasons: 1. In the Spack ecosystem it's by design that every package lives in its own prefix, and can only know where its dependencies are installed, it has no clue what its dependents are and where they are installed. This heuristic detection breaks that invariant, since `hip` is a dependent of `llvm`, and can be surprising to Spack users. 2. The detection can lead to false positives, since users can be using an llvm installed "upstream" with their own build of hip locally, and they may not realize that clang is picking up upstream hip instead of their local copy. 3. It only works if the directory name is `llvm-amdgpu-*` which happens to be the name of AMD's fork of `llvm`, so it makes no sense that this code lives in the main LLVM repo for which the Spack package name is `llvm`. Feels wrong that LLVM knows about Spack package names, which can change over time. 4. Users can change the install directory structure, meaning that this detection is not robust under config changes in Spack.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions