Commit f0975f9
authored
[AMD][Build] Fix build issue with AMD lld (#7608)
The PR triton-lang/triton#7548 requires the use
of LLD as part of LLVM (as opposed to the system LDD), which causes the
following error when
- (1) ldd is not built, or
- (2) the location of the `LLD_DIR` is not specified correctly:
```
CMake Error at third_party/amd/CMakeLists.txt:6 (find_package):
Could not find a package configuration file provided by "LLD" with any of
the following names:
LLDConfig.cmake
lld-config.cmake
```
To fix this issue, this PR made the following changes:
- For (1), build lld in `scripts/build-llvm-project.sh`, which is
invoked by `make dev-install-llvm`. The script was added in README in
triton-lang/triton#6709, and building ldd was
added in triton-lang/triton#6049.
- For (2), make sure that `LLVM_BUILD_PATH` is an absolute path in
Makefile, so `LLD_DIR` and `MLIR_DIR` are interpereted correctly.
Otherwise CMake has hard time finding the relative location with
CMakeLists.txt in a subdirectory.
- Introduce `LLD_DIR` so we don't write `"${MLIR_DIR}/../lld"`.1 parent 620c591 commit f0975f9
File tree
4 files changed
+7
-3
lines changed- scripts
- third_party/amd
4 files changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments