Skip to content

Commit f303816

Browse files
nivetha-kuruparancyndyishida
authored andcommitted
[llvm-readtapi] Fix bad symlink with readtapi tool (llvm#68835)
The Clang-AIX-Wyvern-Dev buildbot is currently failing at the set directory permission due to a bad symlink caused by this [commit](https://github.ibm.com/compiler/llvm-project/commit/a54f31fabd55ab111484b1e094e3d2c6b29c4715). This change is creating the additional symlink `readtapi -> llvm-readtapi` which causes it to appear in `/buildbot_worker/official-worker/clang-aix-dev/installdir`. After some investigation, it looks like `readtapi` is the only tool that is getting symlinked that is not guarded by the `LLVM_INSTALL_BINUTILS_SYMLINKS` macro. For example: 1. `llvm/tools/llvm-objcopy/CMakeLists.txt` ``` if(LLVM_INSTALL_BINUTILS_SYMLINKS) add_llvm_tool_symlink(objcopy llvm-objcopy) endif() ``` 2. `llvm/tools/llvm-dwp/CMakeLists.txt` ``` if(LLVM_INSTALL_BINUTILS_SYMLINKS) add_llvm_tool_symlink(dwp llvm-dwp) endif() ```
1 parent ad5aaea commit f303816

File tree

3 files changed

+33
-12
lines changed

3 files changed

+33
-12
lines changed

llvm/tools/llvm-readtapi/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ add_llvm_tool(llvm-readtapi
1717
ReadTAPIOptsTableGen
1818
)
1919

20-
add_llvm_tool_symlink(readtapi llvm-readtapi)
20+
if(LLVM_INSTALL_BINUTILS_SYMLINKS)
21+
add_llvm_tool_symlink(readtapi llvm-readtapi)
22+
endif()
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import("//llvm/tools/binutils_symlinks.gni")
2+
import("//llvm/utils/gn/build/symlink_or_copy.gni")
3+
4+
if (llvm_install_binutils_symlinks) {
5+
symlink_or_copy("readtapi") {
6+
deps = [ ":llvm-readtapi" ]
7+
source = "llvm-readtapi"
8+
output = "$root_out_dir/bin/readtapi"
9+
}
10+
}
11+
12+
# //:llvm-readtapi depends on this symlink target, see comment in //BUILD.gn.
13+
group("symlinks") {
14+
deps = [ ":llvm-readtapi" ]
15+
if (llvm_install_binutils_symlinks) {
16+
deps += [ ":readtapi" ]
17+
}
18+
}
19+
20+
executable("llvm-readtapi") {
21+
deps = [
22+
"//llvm/lib/Object",
23+
"//llvm/lib/Support",
24+
"//llvm/lib/TextAPI",
25+
]
26+
sources = [
27+
"DiffEngine.cpp",
28+
"llvm-readtapi.cpp",
29+
]
30+
}

llvm/utils/gn/secondary/llvm/tools/llvm-tapi-diff/BUILD.gn

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)