llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang-driver Author: Nikita Popov (nikic) <details> <summary>Changes</summary> The test added in #<!-- -->73511 currently fails in CLANG_DEFAULT_PIE_ON_LINUX=OFF configuration, because it uses the clang driver in a codegen test. Split the test into two, a driver test that checks that the appropriate target feature is passed, and a codegen test that uses cc1. --- Full diff: https://github.com/llvm/llvm-project/pull/79808.diff 2 Files Affected: - (modified) clang/test/CodeGen/SystemZ/unaligned-symbols.c (+4-7) - (added) clang/test/Driver/s390x-unaligned-symbols.c (+7) ``````````diff diff --git a/clang/test/CodeGen/SystemZ/unaligned-symbols.c b/clang/test/CodeGen/SystemZ/unaligned-symbols.c index 31fc211393dd719..b19f30338857992 100644 --- a/clang/test/CodeGen/SystemZ/unaligned-symbols.c +++ b/clang/test/CodeGen/SystemZ/unaligned-symbols.c @@ -1,13 +1,10 @@ -// RUN: %clang -target s390x-linux-gnu %s -o - -emit-llvm -S \ +// RUN: %clang_cc1 -triple s390x-linux-gnu %s -o - -emit-llvm \ // RUN: | FileCheck %s -check-prefixes=CHECK,ALIGNED -// RUN: %clang -target s390x-linux-gnu %s -o - -emit-llvm -S \ -// RUN: -mno-unaligned-symbols | FileCheck %s -check-prefixes=CHECK,ALIGNED +// RUN: %clang_cc1 -triple s390x-linux-gnu %s -o - -emit-llvm \ +// RUN: -target-feature -unaligned-symbols | FileCheck %s -check-prefixes=CHECK,ALIGNED -// RUN: %clang -target s390x-linux-gnu %s -o - -emit-llvm -S \ -// RUN: -munaligned-symbols | FileCheck %s -check-prefixes=CHECK,UNALIGN - -// RUN: %clang -cc1 -triple s390x-linux-gnu %s -o - -emit-llvm \ +// RUN: %clang_cc1 -triple s390x-linux-gnu %s -o - -emit-llvm \ // RUN: -target-feature +unaligned-symbols | FileCheck %s -check-prefixes=CHECK,UNALIGN diff --git a/clang/test/Driver/s390x-unaligned-symbols.c b/clang/test/Driver/s390x-unaligned-symbols.c new file mode 100644 index 000000000000000..1dff5b737fff776 --- /dev/null +++ b/clang/test/Driver/s390x-unaligned-symbols.c @@ -0,0 +1,7 @@ +// RUN: %clang -target s390x-linux-gnu -### -c %s 2>&1 | FileCheck -check-prefix=DEFAULT %s +// RUN: %clang -target s390x-linux-gnu -mno-unaligned-symbols -### -c %s 2>&1 | FileCheck -check-prefix=ALIGNED %s +// RUN: %clang -target s390x-linux-gnu -munaligned-symbols -### -c %s 2>&1 | FileCheck -check-prefix=UNALIGN %s + +// DEFAULT-NOT: unaligned-symbols" +// ALIGNED: "-target-feature" "-unaligned-symbols" +// UNALIGN: "-target-feature" "+unaligned-symbols" `````````` </details> https://github.com/llvm/llvm-project/pull/79808 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits