[llvm] [flang-rt] Fix ISO test not respecting real kind flags (PR #198922)
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Thu May 21 02:32:40 PDT 2026
================
@@ -623,6 +623,9 @@ if(build_runtimes)
endif()
if("flang-rt" IN_LIST LLVM_ENABLE_RUNTIMES)
list(APPEND extra_args ENABLE_FORTRAN)
+ if (${LLVM_TOOL_FLANG_BUILD})
----------------
Meinersbur wrote:
```suggestion
if (LLVM_TOOL_FLANG_BUILD)
```
`if (${LLVM_TOOL_FLANG_BUILD})` causes the expression in `LLVM_TOOL_FLANG_BUILD` to be evaluated. So if `LLVM_TOOL_FLANG_BUILD` contrains "LLVM_ENABLE_ASSERTIONS", it will subsitute to `if (LLVM_ENABLE_ASSERTIONS)`.
It is not likely that `LLVM_TOOL_FLANG_BUILD` contains anything other than ON/OFF/YES/NO/1/0, but I doubt this intents to evaluate the expression in `LLVM_TOOL_FLANG_BUILD`. I consider it best practice because it has caused issues in the past.
https://github.com/llvm/llvm-project/pull/198922
More information about the llvm-commits
mailing list