commit | 72cfc12670f669200da4ab12b82abf1cebedf57e | [log] [tgz] |
---|---|---|
author | Harmen Stoppels <me@harmenstoppels.nl> | Wed Apr 02 09:52:27 2025 +0200 |
committer | Copybara-Service <copybara-worker@google.com> | Wed Apr 02 00:56:38 2025 -0700 |
tree | 39d9967a6679ecfb8002014b8feede16da620164 | |
parent | 9425813e6489b12f01ba58815f82f3ef057e856f [diff] |
[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. GitOrigin-RevId: bd788dbf516be98044254336f54b72d077f69771
Welcome to Clang.
This is a compiler front-end for the C family of languages (C, C++ and Objective-C) which is built as part of the LLVM compiler infrastructure project.
Unlike many other compiler frontends, Clang is useful for a number of things beyond just compiling code: we intend for Clang to be host to a number of different source-level tools. One example of this is the Clang Static Analyzer.
If you're interested in more (including how to build Clang) it is best to read the relevant websites. Here are some pointers:
Information on Clang: http://clang.llvm.org/
Building and using Clang: http://clang.llvm.org/get_started.html
Clang Static Analyzer: http://clang-analyzer.llvm.org/
Information on the LLVM project: http://llvm.org/
If you have questions or comments about Clang, a great place to discuss them is on the Clang forums:
If you find a bug in Clang, please file it in the LLVM bug tracker: