Skip to content

Commit 2805e6f

Browse files
authored
[llvm-driver] Add driver alias for c++filt (#92803)
Similar to 9d955a6, this allows the driver to respond to `c++filt`.
1 parent 70fc239 commit 2805e6f

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

llvm/test/tools/llvm-driver/symlink-call.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
# RUN: %t/cxxfilt-15 --help | FileCheck %s
1515
# RUN: ln -s %llvm %t/cxxfilt-15.exe
1616
# RUN: %t/cxxfilt-15.exe --help | FileCheck %s
17+
# RUN: ln -s %llvm %t/c++filt
18+
# RUN: %t/c++filt --help | FileCheck %s
1719

1820
# RUN: ln -s %llvm %t/llvm-15
1921
# RUN: %t/llvm-15 cxxfilt --help | FileCheck %s

llvm/tools/llvm-cxxfilt/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ add_llvm_tool(llvm-cxxfilt
1717
GENERATE_DRIVER
1818
)
1919

20+
if(LLVM_TOOL_LLVM_DRIVER_BUILD)
21+
set_property(GLOBAL APPEND PROPERTY LLVM_DRIVER_HIDDEN_TOOL_ALIASES_llvm-cxxfilt c++filt)
22+
endif()
23+
2024
if(LLVM_INSTALL_BINUTILS_SYMLINKS)
2125
add_llvm_tool_symlink(c++filt llvm-cxxfilt)
2226
endif()

utils/bazel/llvm-project-overlay/llvm/driver.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ _EXTRA_ALIASES = {
3939
"clang": ["clang++", "clang-cl", "clang-cpp"],
4040
"lld": ["ld", "lld-link", "ld.lld", "ld64.lld", "wasm-ld"],
4141
"llvm-ar": ["ranlib", "lib", "dlltool"],
42+
"llvm-cxxfilt": ["c++filt"],
4243
"llvm-objcopy": ["bitcode-strip", "install-name-tool", "strip"],
4344
"llvm-objdump": ["otool"],
4445
"llvm-rc": ["windres"],

0 commit comments

Comments
 (0)