The condition was always false.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
compiler-rt/cmake/config-ix.cmake | ||
---|---|---|
238 | This check is also broken, but I'm not sure how to fix it. |
compiler-rt/cmake/config-ix.cmake | ||
---|---|---|
238 | I'd drop this if if there are no objections. |
compiler-rt/cmake/config-ix.cmake | ||
---|---|---|
44 | I'm fine with this change as a cleanup, but this should behave identically. The change description says "The condition was always false." Where did you observe this? | |
238 | I'd consider removing this entire check since I'm not sure whether it provides any value, but I'd do it in a separate change. |
compiler-rt/cmake/config-ix.cmake | ||
---|---|---|
44 | I found it when porting compiler-rt for an out-of-tree target. It was probably unnoticed because it only affects checks like check_symbol_exists. This should demonstrate the issue: cmake_minimum_required(VERSION 3.20) project(test) execute_process( COMMAND which time OUTPUT_VARIABLE time ) string(STRIP "${time}" time) file(TO_CMAKE_PATH "${time}" time) message(STATUS "time=${time}") if (${time}) message(STATUS "${time} is true") else() message(STATUS "${time} is false") endif() -- time=/usr/bin/time -- /usr/bin/time is false |
compiler-rt/cmake/config-ix.cmake | ||
---|---|---|
44 | if (${VAR}) and if (VAR) behave identical for boolean values but not for string values. |
compiler-rt/cmake/config-ix.cmake | ||
---|---|---|
43–44 | I think we should remove this condition altogether since PR51389 has already been addressed. |
compiler-rt/cmake/config-ix.cmake | ||
---|---|---|
43–44 | Thanks for the heads-up, I'll see what I can do |
compiler-rt/cmake/config-ix.cmake | ||
---|---|---|
43–44 |
It is still open though https://github.com/llvm/llvm-project/issues/50731 |
compiler-rt/cmake/config-ix.cmake | ||
---|---|---|
43–44 | It was addressed in https://reviews.llvm.org/D88458. |
compiler-rt/cmake/config-ix.cmake | ||
---|---|---|
43–44 | Thanks! |
I'm fine with this change as a cleanup, but this should behave identically. The change description says "The condition was always false." Where did you observe this?