[flang-commits] [flang] [flang] Fix flang tests on MacOS (PR #70811)

Leandro Lupori via flang-commits flang-commits at lists.llvm.org
Tue Nov 7 06:54:15 PST 2023


================
@@ -5,6 +5,9 @@ a C compiler.
 
 REQUIRES: c-compiler
 
+MacOS doesn't have a separate libm.
+UNSUPPORTED: system-darwin
----------------
luporl wrote:

I couldn't make it work with `DEFINE`/`REDEFINE`, because this test needs to produce a binary linked against system's C library. ``%if system-darwin %{-isysroot `xcode-select -p`"/SDKs/MacOSX.sdk"%} %else %{-lm%}`` worked, but it hardcodes part of the sysroot path.

Actually, after digging a bit more, I found out the real issue is that on MacOS a valid `-isysroot` flag is needed for the built clang to find the system headers and libraries. I'm going to update this PR with the needed changes in `flang/test/lit.cfg.py` and `flang/test/lit.site.cfg.py.in`.

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


More information about the flang-commits mailing list