From 225cf64e03b4e394c32e95fe1d6414e6e16be094 Mon Sep 17 00:00:00 2001 From: Chen Zheng Date: Mon, 5 Jun 2023 03:40:50 -0400 Subject: [PATCH] fix failures caused by https://reviews.llvm.org/D148490 buildbot: https://lab.llvm.org/buildbot/#/builders/214/builds/7823 --- clang/test/Driver/as-version.s | 2 +- clang/test/Driver/clang_f_opts.c | 9 --------- clang/test/Driver/compilation-dir.c | 10 ++++++++++ clang/test/Driver/compress-unavailable.s | 2 ++ clang/test/Driver/debug-options-as.c | 2 ++ clang/test/Driver/debug-prefix-map.S | 2 ++ clang/test/Driver/defsym.s | 2 ++ clang/test/Driver/embed-bitcode.c | 4 ++-- clang/test/Driver/integrated-as.c | 2 ++ clang/test/Driver/relax.s | 2 +- 10 files changed, 24 insertions(+), 13 deletions(-) create mode 100644 clang/test/Driver/compilation-dir.c diff --git a/clang/test/Driver/as-version.s b/clang/test/Driver/as-version.s index a96b2b5..5003819 100644 --- a/clang/test/Driver/as-version.s +++ b/clang/test/Driver/as-version.s @@ -1,6 +1,6 @@ // Test version information. -// UNSUPPORTED: target={{.*}}-zos{{.*}} +// UNSUPPORTED: target={{.*}}-zos{{.*}}, target={{.*}}-aix{{.*}} // RUN: %clang -Wa,--version -c -fintegrated-as %s -o /dev/null \ // RUN: | FileCheck --check-prefix=IAS %s // IAS: clang version diff --git a/clang/test/Driver/clang_f_opts.c b/clang/test/Driver/clang_f_opts.c index 67ec82a..8060e52 100644 --- a/clang/test/Driver/clang_f_opts.c +++ b/clang/test/Driver/clang_f_opts.c @@ -517,15 +517,6 @@ // CHECK-CF-PROTECTION-BRANCH: -fcf-protection=branch // CHECK-NO-CF-PROTECTION-BRANCH-NOT: -fcf-protection=branch -// RUN: %clang -### -S -fdebug-compilation-dir . %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s -// RUN: %clang -### -S -fdebug-compilation-dir=. %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s -// RUN: %clang -### -integrated-as -fdebug-compilation-dir . -x assembler %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s -// RUN: %clang -### -integrated-as -fdebug-compilation-dir=. -x assembler %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s -// RUN: %clang -### -S -ffile-compilation-dir=. %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s -// RUN: %clang -### -integrated-as -ffile-compilation-dir=. -x assembler %s 2>&1 | FileCheck -check-prefixes=CHECK-DEBUG-COMPILATION-DIR %s -// CHECK-DEBUG-COMPILATION-DIR: "-fdebug-compilation-dir=." -// CHECK-DEBUG-COMPILATION-DIR-NOT: "-ffile-compilation-dir=." - // RUN: %clang -### -S -fprofile-instr-generate -fcoverage-compilation-dir=. %s 2>&1 | FileCheck -check-prefix=CHECK-COVERAGE-COMPILATION-DIR %s // RUN: %clang -### -S -fprofile-instr-generate -ffile-compilation-dir=. %s 2>&1 | FileCheck -check-prefix=CHECK-COVERAGE-COMPILATION-DIR %s // CHECK-COVERAGE-COMPILATION-DIR: "-fcoverage-compilation-dir=." diff --git a/clang/test/Driver/compilation-dir.c b/clang/test/Driver/compilation-dir.c new file mode 100644 index 0000000..dbe801c --- /dev/null +++ b/clang/test/Driver/compilation-dir.c @@ -0,0 +1,10 @@ +// XFAIL: target={{.*}}-aix{{.*}} + +// RUN: %clang -### -S -fdebug-compilation-dir . %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s +// RUN: %clang -### -S -fdebug-compilation-dir=. %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s +// RUN: %clang -### -integrated-as -fdebug-compilation-dir . -x assembler %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s +// RUN: %clang -### -integrated-as -fdebug-compilation-dir=. -x assembler %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s +// RUN: %clang -### -S -ffile-compilation-dir=. %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s +// RUN: %clang -### -integrated-as -ffile-compilation-dir=. -x assembler %s 2>&1 | FileCheck -check-prefixes=CHECK-DEBUG-COMPILATION-DIR %s +// CHECK-DEBUG-COMPILATION-DIR: "-fdebug-compilation-dir=." +// CHECK-DEBUG-COMPILATION-DIR-NOT: "-ffile-compilation-dir=." diff --git a/clang/test/Driver/compress-unavailable.s b/clang/test/Driver/compress-unavailable.s index e44fcb4..2842c23 100644 --- a/clang/test/Driver/compress-unavailable.s +++ b/clang/test/Driver/compress-unavailable.s @@ -1,3 +1,5 @@ +; XFAIL: target={{.*}}-aix{{.*}} + // RUN: %clang -### -fintegrated-as -gz=none -c %s 2>&1 | FileCheck %s --check-prefix=NOWARN // NOWARN-NOT: warning: cannot compress debug sections (zlib not enabled) diff --git a/clang/test/Driver/debug-options-as.c b/clang/test/Driver/debug-options-as.c index 87268e8..5bb67e9 100644 --- a/clang/test/Driver/debug-options-as.c +++ b/clang/test/Driver/debug-options-as.c @@ -1,3 +1,5 @@ +; XFAIL: target={{.*}}-aix{{.*}} + // Check to make sure clang is somewhat picky about -g options. // (Delived from debug-options.c) // rdar://10383444 diff --git a/clang/test/Driver/debug-prefix-map.S b/clang/test/Driver/debug-prefix-map.S index 6dd1ded..ae52652 100644 --- a/clang/test/Driver/debug-prefix-map.S +++ b/clang/test/Driver/debug-prefix-map.S @@ -1,3 +1,5 @@ +; XFAIL: target={{.*}}-aix{{.*}} + // RUN: %clang -### -g -fintegrated-as -fdebug-prefix-map=old=new %s 2>&1 | FileCheck %s // RUN: %clang -### -g -fintegrated-as -ffile-prefix-map=old=new %s 2>&1 | FileCheck %s diff --git a/clang/test/Driver/defsym.s b/clang/test/Driver/defsym.s index ae2b1fd..ecd13a2 100644 --- a/clang/test/Driver/defsym.s +++ b/clang/test/Driver/defsym.s @@ -1,3 +1,5 @@ +; XFAIL: target={{.*}}-aix{{.*}} + // RUN: %clang -### -c -integrated-as %s \ // RUN: -Wa,-defsym,abc=5 -Wa,-defsym,xyz=0xa \ // RUN: 2>&1 | FileCheck %s --check-prefix=CHECK-DEFSYM1 diff --git a/clang/test/Driver/embed-bitcode.c b/clang/test/Driver/embed-bitcode.c index 07e4378..0dadfa4 100644 --- a/clang/test/Driver/embed-bitcode.c +++ b/clang/test/Driver/embed-bitcode.c @@ -16,7 +16,7 @@ // CHECK-BITCODE: -emit-obj // CHECK-BITCODE: -fembed-bitcode=bitcode // -// RUN: %clang %s -c -save-temps -fembed-bitcode -fintegrated-as 2>&1 -### | FileCheck %s -check-prefix=CHECK-SAVE-TEMP +// RUN: %clang %s -c -target powerpc-ibm-aix -save-temps -fembed-bitcode -fintegrated-as 2>&1 -### | FileCheck %s -check-prefix=CHECK-SAVE-TEMP // CHECK-SAVE-TEMP: -cc1 // CHECK-SAVE-TEMP: -E // CHECK-SAVE-TEMP: -cc1 @@ -24,7 +24,7 @@ // CHECK-SAVE-TEMP: -cc1 // CHECK-SAVE-TEMP: -S // CHECK-SAVE-TEMP: -fembed-bitcode=all -// CHECK-SAVE-TEMP: -cc1as +// CHECK-SAVE-TEMP: "{{.*}}as{{(.exe)?}}" // RUN: %clang -c %s -flto -fembed-bitcode 2>&1 -### | FileCheck %s -check-prefix=CHECK-LTO // RUN: %clang -c %s -flto=full -fembed-bitcode 2>&1 -### | FileCheck %s -check-prefix=CHECK-LTO diff --git a/clang/test/Driver/integrated-as.c b/clang/test/Driver/integrated-as.c index 55334ed..aca0ba2 100644 --- a/clang/test/Driver/integrated-as.c +++ b/clang/test/Driver/integrated-as.c @@ -1,3 +1,5 @@ +; XFAIL: target={{.*}}-aix{{.*}} + // RUN: %clang -### -c -save-temps -integrated-as %s 2>&1 | FileCheck %s // CHECK: cc1as diff --git a/clang/test/Driver/relax.s b/clang/test/Driver/relax.s index 01ae9d8..154d4db 100644 --- a/clang/test/Driver/relax.s +++ b/clang/test/Driver/relax.s @@ -1,5 +1,5 @@ // REQUIRES: x86-registered-target -// RUN: %clang -### -c -integrated-as -Wa,--mrelax-relocations=no %s 2>&1 | FileCheck %s +// RUN: %clang -### -c -target x86_64-pc-linux -integrated-as -Wa,--mrelax-relocations=no %s 2>&1 | FileCheck %s // CHECK: "-cc1as" // CHECK: "-mrelax-relocations=no" -- 2.7.4