[clang] [clang] Fix darwin-related tests' REQUIRES annotation (PR #130138)

Cyndy Ishida via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 10 09:44:19 PDT 2025


cyndyishida wrote:

> This approach becomes a problem when trying to run such tests on a
cross-compiling build of clang on a darwin platform. When no darwin
targets are included in the build, the tests will still run on a darwin
host and fail spuriously because of the missing target.

This doesn't happen for tests with `target=<arch>-apple<platform&version>` right? It's not clear to me why the tests that explicitly pass an alternative way to set the target triple (e.g. with env vars or with `mtargetos`) fail. It would be good to diagnose that first.

> Can you confirm my understanding of -mtargetos?
This option should set the darwin target triple.  It's the generic equivalent of 
```
      -macosx_version_min <value>
       -ios_version_min <value>
       -watchos_version_min <value>
       -tvos_version_min <value>
```

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


More information about the cfe-commits mailing list