diff options
author | Brad Smith <brad@comstyle.com> | 2019-01-15 21:04:36 +0000 |
---|---|---|
committer | Brad Smith <brad@comstyle.com> | 2019-01-15 21:04:36 +0000 |
commit | 81b77028c8d5988327079b442bceb10d662d2e1d (patch) | |
tree | 5243c8a12444566c71607a45e2120ae1a5df257f | |
parent | 03e3065f240dd72aa8c57d970802ec57cc374bdb (diff) |
Enable IAS for OpenBSD SPARC.
-rw-r--r-- | clang/lib/Driver/ToolChains/Gnu.cpp | 2 | ||||
-rw-r--r-- | clang/test/Driver/openbsd.c | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp index e4b35890199..2ad45097dce 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2512,7 +2512,7 @@ bool Generic_GCC::IsIntegratedAssemblerDefault() const { case llvm::Triple::sparc: case llvm::Triple::sparcel: case llvm::Triple::sparcv9: - if (getTriple().isOSSolaris()) + if (getTriple().isOSSolaris() || getTriple().isOSOpenBSD()) return true; return false; default: diff --git a/clang/test/Driver/openbsd.c b/clang/test/Driver/openbsd.c index 182c4d49d64..59ec8833719 100644 --- a/clang/test/Driver/openbsd.c +++ b/clang/test/Driver/openbsd.c @@ -74,12 +74,16 @@ // CHECK-MIPS64EL: as{{.*}}" "-mabi" "64" "-EL" // CHECK-MIPS64EL-PIC: as{{.*}}" "-mabi" "64" "-EL" "-KPIC" -// Check that the integrated assembler is enabled for MIPS64 +// Check that the integrated assembler is enabled for MIPS64/SPARC // RUN: %clang -target mips64-unknown-openbsd -### -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix=CHECK-MIPS64-AS %s +// RUN: | FileCheck -check-prefix=CHECK-IAS %s // RUN: %clang -target mips64el-unknown-openbsd -### -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix=CHECK-MIPS64-AS %s -// CHECK-MIPS64-AS-NOT: "-no-integrated-as" +// RUN: | FileCheck -check-prefix=CHECK-IAS %s +// RUN: %clang -target sparc-unknown-openbsd -### -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-IAS %s +// RUN: %clang -target sparc64-unknown-openbsd -### -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-IAS %s +// CHECK-IAS-NOT: "-no-integrated-as" // Check linking against correct startup code when (not) using PIE // RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd %s -### 2>&1 \ |