Skip to content

Commit f9c9968

Browse files
authored
cmake: Avoid using if(TARGET x AND TARGET y) (#159707)
This appears to not work, and the documentation only has examples with a single target checked at a time.
1 parent 58a5121 commit f9c9968

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/benchmarks/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ add_benchmark(SandboxIRBench SandboxIRBench.cpp PARTIAL_SOURCES_INTENDED)
1414
add_benchmark(RuntimeLibcallsBench RuntimeLibcalls.cpp PARTIAL_SOURCES_INTENDED)
1515

1616
if(NOT LLVM_TOOL_LLVM_DRIVER_BUILD)
17-
# TODO: Check if the tools aer in LLVM_DISTRIBUTION_COMPONENTS with
17+
# TODO: Check if the tools are in LLVM_DISTRIBUTION_COMPONENTS with
1818
# the driver build. Also support the driver build by invoking the
1919
# tools through llvm-driver
2020
get_host_tool_path(llvm-nm LLVM_NM llvm_nm_exe llvm_nm_target)
2121
get_host_tool_path(llc LLC llc_exe llc_target)
2222

23-
if(TARGET ${llc_target} AND TARGET ${llvm_nm_target})
23+
if(${llc_exe} AND ${llvm_nm_exe})
2424
# Extract the list of symbols in a random utility as sample data.
2525
set(SYMBOL_TEST_DATA_FILE "sample_symbol_list.txt")
2626
set(SYMBOL_TEST_DATA_SOURCE_BINARY ${llc_exe})

0 commit comments

Comments
 (0)