[llvm] TableGen: Emit static hash table for runtime libcalls (PR #150192)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 16 07:15:16 PDT 2025
================
@@ -11,3 +11,20 @@ add_benchmark(FormatVariadicBM FormatVariadicBM.cpp PARTIAL_SOURCES_INTENDED)
add_benchmark(GetIntrinsicInfoTableEntriesBM GetIntrinsicInfoTableEntriesBM.cpp PARTIAL_SOURCES_INTENDED)
add_benchmark(SandboxIRBench SandboxIRBench.cpp PARTIAL_SOURCES_INTENDED)
+# Extract the list of symbols in a random utility as sample data.
+set(SYMBOL_TEST_DATA_FILE "sample_symbol_list.txt")
+set(SYMBOL_TEST_DATA_SOURCE_BINARY $<TARGET_FILE:llc>)
+
+add_custom_command(OUTPUT ${SYMBOL_TEST_DATA_FILE}
+ COMMAND $<TARGET_FILE:llvm-nm> --no-demangle --no-sort
----------------
s-barannikov wrote:
File dependencies don't work well in CMake. I think this should be
```suggestion
COMMAND llvm-nm --no-demangle --no-sort
```
and
```
DEPENDS llc
```
CMake will recognize the names if they are existing targets and add proper dependencies (COMMAND should add a dependency on llvm-nm). Not sure what llc dependency is for here.
It might still need a check if the target exists `if (TARGET llvm-nm)`.
https://github.com/llvm/llvm-project/pull/150192
More information about the llvm-commits
mailing list