[clang] 5de4d97 - Driver tests: remove `REQUIRES: x86-registered-target` and set `--sysroot=""` to support clang with `DEFAULT_SYSROOT`.
Ying Yi via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 5 02:00:59 PDT 2022
Author: Ying Yi
Date: 2022-09-05T09:59:47+01:00
New Revision: 5de4d97a00b2a5d710892e96d77810784fd2cd5c
URL: https://github.com/llvm/llvm-project/commit/5de4d97a00b2a5d710892e96d77810784fd2cd5c
DIFF: https://github.com/llvm/llvm-project/commit/5de4d97a00b2a5d710892e96d77810784fd2cd5c.diff
LOG: Driver tests: remove `REQUIRES: x86-registered-target` and set `--sysroot=""` to support clang with `DEFAULT_SYSROOT`.
When testing clang that has been compiled with -DDEFAULT_SYSROOT set to some path, ps4-ps5-header-search.c would fail.
The test needs to be updated.
1. Remove unnecessary REQUIRES: x86-registered-target.
2. Override sysroot to be empty string for the test to succeed when clang is configured with DEFAULT_SYSROOT.
Added:
Modified:
clang/test/Driver/ps4-ps5-header-search.c
Removed:
################################################################################
diff --git a/clang/test/Driver/ps4-ps5-header-search.c b/clang/test/Driver/ps4-ps5-header-search.c
index 6848901df5590..59d3f2ab2d1df 100644
--- a/clang/test/Driver/ps4-ps5-header-search.c
+++ b/clang/test/Driver/ps4-ps5-header-search.c
@@ -1,8 +1,6 @@
-// REQUIRES: x86-registered-target
-
/// PS4 and PS5 use the same SDK layout, so use the same tree for both.
-// RUN: env SCE_ORBIS_SDK_DIR=%S/Inputs/scei-ps4_tree %clang -target x86_64-scei-ps4 -E -v %s 2>&1 | FileCheck %s --check-prefix=ENVPS4
-// RUN: env SCE_PROSPERO_SDK_DIR=%S/Inputs/scei-ps4_tree %clang -target x86_64-sie-ps5 -E -v %s 2>&1 | FileCheck %s --check-prefix=ENVPS4
+// RUN: env SCE_ORBIS_SDK_DIR=%S/Inputs/scei-ps4_tree %clang -target x86_64-scei-ps4 --sysroot="" -E -v %s 2>&1 | FileCheck %s --check-prefix=ENVPS4
+// RUN: env SCE_PROSPERO_SDK_DIR=%S/Inputs/scei-ps4_tree %clang -target x86_64-sie-ps5 --sysroot="" -E -v %s 2>&1 | FileCheck %s --check-prefix=ENVPS4
// ENVPS4: Inputs/scei-ps4_tree/target/include{{$}}
// ENVPS4: Inputs/scei-ps4_tree/target/include_common{{$}}
// ENVPS4-NOT: /usr/include
More information about the cfe-commits
mailing list