[flang-commits] [flang] [flang] Fix failure of regression tests on macOS (PR #151812)

Leandro Lupori via flang-commits flang-commits at lists.llvm.org
Mon Aug 4 09:59:25 PDT 2025


luporl wrote:

> However, I was not sure which tests exactly need the flag, so I tried removing it in testing and found that all tests were passed.

If I remove `-isysroot` from tests, I see the following failures:

```
check-flang:
  Flang :: Integration/iso-fortran-binding.cpp
check-flang-rt:
  flang-rt :: Driver/ctofortran.f90
  flang-rt :: Runtime/no-cpp-dep.c
  flang-rt-Unit :: Runtime/./RuntimeTests/NoArgv/FdateNotSupported (this test was already failing)
```

So, when not using `DEFAULT_SYSROOT` or `SDKROOT`, `-isysroot` is needed, so that the system libraries are found.

What is the issue with `SDKROOT`? Should the tests be using the SDK specified in it when it is set?
If so, this could be easily changed in `llvm-project/flang/test/lit.cfg.py`.

Since there are only 3 tests that need `-isysroot`, another option is to not include it by default and add a new substitution, such as `%isysroot_flag`, and then use it only in the tests above.

https://github.com/llvm/llvm-project/pull/151812


More information about the flang-commits mailing list