[llvm] benchmarks: Fix sample_symbol_list.txt generation again (PR #167078)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 7 22:45:00 PST 2025
================
@@ -22,23 +22,25 @@ if(NOT LLVM_TOOL_LLVM_DRIVER_BUILD)
get_host_tool_path(llvm-nm LLVM_NM llvm_nm_exe llvm_nm_target)
get_host_tool_path(llc LLC llc_exe llc_target)
- if(${llc_exe} AND ${llvm_nm_exe})
- # 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 ${llc_exe})
+ if(TARGET ${llc_target})
----------------
s-barannikov wrote:
Since last review I learned that `if` argument shouldn't use `${}` syntax, otherwice it may be expanded twice (if the first expansion yields a name of existing cmake variable).
Perhaps `if (TARGET llc_target AND TARGET llvm_nm_target)` would work as well.
https://github.com/llvm/llvm-project/pull/167078
More information about the llvm-commits
mailing list