Skip to content

Commit 0defaba

Browse files
authored
Merge pull request #8279 from benlangmuir/fix-tests-stable
[stable/20230725][clang] Fix clang tests that use darwin features for Linux
2 parents 1259827 + 424d773 commit 0defaba

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

clang/test/CAS/mccas-replay.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
// REQUIRES: x86-registered-target
12
// RUN: rm -rf %t && mkdir %t
23

3-
// RUN: %clang -cc1depscan -o %t/args.rsp -cc1-args -cc1 \
4+
// RUN: %clang -cc1depscan -o %t/args.rsp -cc1-args -cc1 -triple x86_64-apple-darwin10 \
45
// RUN: -debug-info-kind=standalone -dwarf-version=4 -debugger-tuning=lldb \
56
// RUN: -emit-obj -fcas-backend -fcas-path %t/cas %s -o - > /dev/null
67

clang/test/ClangScanDeps/modules-include-tree-prefix-map.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// REQUIRES: ondisk_cas
2+
// REQUIRES: x86-registered-target
23

34
// RUN: rm -rf %t
45
// RUN: split-file %s %t/dir1
@@ -314,7 +315,7 @@
314315
[{
315316
"file": "DIR/tu.m",
316317
"directory": "DIR",
317-
"command": "CLANG -fsyntax-only DIR/tu.m -I DIR -isystem DIR/System -fmodules -fimplicit-modules -fimplicit-module-maps -fmodules-cache-path=DIR/module-cache -Rcompile-job-cache"
318+
"command": "CLANG -target x86_64-apple-darwin10 -fsyntax-only DIR/tu.m -I DIR -isystem DIR/System -fmodules -fimplicit-modules -fimplicit-module-maps -fmodules-cache-path=DIR/module-cache -Rcompile-job-cache"
318319
}]
319320

320321
//--- module.modulemap

clang/test/Index/Store/handle-prebuilt-module.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
// REQUIRES: x86-registered-target
12
// RUN: rm -rf %t
23
// RUN: mkdir %t
3-
// RUN: %clang -arch x86_64 -mmacosx-version-min=10.7 -fsyntax-only %s -o %t.o -index-store-path %t/idx1 -fmodules -fmodules-cache-path=%t/mcp -I %S/Inputs/module -Rindex-store 2> %t.err1
4-
// RUN: %clang -arch x86_64 -mmacosx-version-min=10.7 -fsyntax-only %s -o %t.o -index-store-path %t/idx2 -fmodules -fmodules-cache-path=%t/mcp -I %S/Inputs/module -Rindex-store 2> %t.err2
5-
// RUN: %clang -arch x86_64 -mmacosx-version-min=10.7 -fsyntax-only %s -o %t.o -index-store-path %t/idx2 -fmodules -fmodules-cache-path=%t/mcp -I %S/Inputs/module -Rindex-store 2> %t.err3
4+
// RUN: %clang -target x86_64-apple-macos10.7 -fsyntax-only %s -o %t.o -index-store-path %t/idx1 -fmodules -fmodules-cache-path=%t/mcp -I %S/Inputs/module -Rindex-store 2> %t.err1
5+
// RUN: %clang -target x86_64-apple-macos10.7 -fsyntax-only %s -o %t.o -index-store-path %t/idx2 -fmodules -fmodules-cache-path=%t/mcp -I %S/Inputs/module -Rindex-store 2> %t.err2
6+
// RUN: %clang -target x86_64-apple-macos10.7 -fsyntax-only %s -o %t.o -index-store-path %t/idx2 -fmodules -fmodules-cache-path=%t/mcp -I %S/Inputs/module -Rindex-store 2> %t.err3
67
// RUN: FileCheck -input-file=%t.err1 -check-prefix=CREATING_MODULES %s -allow-empty
78
// RUN: FileCheck -input-file=%t.err2 -check-prefix=CREATING_INDEX_DATA_FROM_MODULE_FILES %s
89
// RUN: FileCheck -input-file=%t.err3 -check-prefix=EXISTING_INDEX_DATA_FROM_MODULE_FILES %s -allow-empty

clang/test/Index/Store/print-units-with-modules.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
// REQUIRES: x86-registered-target
12
// RUN: rm -rf %t.idx %t.mcp
2-
// RUN: %clang -arch x86_64 -mmacosx-version-min=10.7 -c %s -o %t.o -index-store-path %t.idx -fmodules -fmodules-cache-path=%t.mcp -Xclang -fdisable-module-hash -I %S/Inputs/module
3+
// RUN: %clang -target x86_64-apple-macos10.7 -c %s -o %t.o -index-store-path %t.idx -fmodules -fmodules-cache-path=%t.mcp -Xclang -fdisable-module-hash -I %S/Inputs/module
34
// RUN: c-index-test core -print-unit %t.idx | FileCheck %s
45

56
@import ModDep;

0 commit comments

Comments
 (0)