[all-commits] [llvm/llvm-project] 44e4b2: [clang] Fix darwin-related tests' REQUIRES annotat...

Lucas Duarte Prates via All-commits all-commits at lists.llvm.org
Tue Mar 18 02:12:05 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 44e4b27aec8639823030dd90eb04afa6545c8352
      https://github.com/llvm/llvm-project/commit/44e4b27aec8639823030dd90eb04afa6545c8352
  Author: Lucas Duarte Prates <lucas.prates at arm.com>
  Date:   2025-03-18 (Tue, 18 Mar 2025)

  Changed paths:
    M clang/test/Driver/apple-arm64-arch.c
    M clang/test/Driver/compilation_database_multiarch.c
    M clang/test/Driver/darwin-ld-platform-version-macos-requires-darwin.c
    M clang/test/Driver/mtargetos-darwin.c
    M clang/test/Driver/xros-driver-requires-darwin-host.c
    M clang/test/Index/pch-from-libclang.c

  Log Message:
  -----------
  [clang] Fix darwin-related tests' REQUIRES annotation (#130138)

The tests updated by this commit were designed to check features in the
clang's driver and index that require clang to be targgeting a darwin
platform while running on a darwin host. For that, their execution is
currently gated by the `REQUIRES: system-darwin` annotation.

This approach becomes a problem when trying to run such tests on a
cross-compiling build of clang on a darwin platform. When the default
target is not darwin (e.g. via `LLVM_DEFAULT_TARGET_TRIPLE `), the
tests will still run on a darwin host and fail spuriously because of the
mismatch with the target detection.

To fix this issue, this patch introduces an extra condition to the
tests' REQUIRES annotation, `target={{.*}}-{{darwin|macos}}{{.*}}`,
ensuring they only run when the relevant target is present.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list