From 33db9e31e8064b780fba90018061fd42f2b9dc14 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Mon, 16 Jun 2014 23:03:00 +0000 Subject: [PATCH] Use the integrated assembler by default on OpenBSD/powerpc. llvm-svn: 211075 --- clang/lib/Driver/ToolChains.h | 6 ++++++ clang/test/Driver/openbsd.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/clang/lib/Driver/ToolChains.h b/clang/lib/Driver/ToolChains.h index 13e9d67..8931aec 100644 --- a/clang/lib/Driver/ToolChains.h +++ b/clang/lib/Driver/ToolChains.h @@ -537,6 +537,12 @@ public: return 2; } + virtual bool IsIntegratedAssemblerDefault() const { + if (getTriple().getArch() == llvm::Triple::ppc) + return true; + return Generic_ELF::IsIntegratedAssemblerDefault(); + } + protected: Tool *buildAssembler() const override; Tool *buildLinker() const override; diff --git a/clang/test/Driver/openbsd.c b/clang/test/Driver/openbsd.c index 5fe27f3..6507838 100644 --- a/clang/test/Driver/openbsd.c +++ b/clang/test/Driver/openbsd.c @@ -59,3 +59,8 @@ // CHECK-MIPS64-PIC: as{{.*}}" "-mabi" "64" "-EB" "-KPIC" // CHECK-MIPS64EL: as{{.*}}" "-mabi" "64" "-EL" // CHECK-MIPS64EL-PIC: as{{.*}}" "-mabi" "64" "-EL" "-KPIC" + +// Check that the integrated assembler is enabled for PowerPC +// RUN: %clang -target powerpc-unknown-openbsd -### -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-POWERPC-AS %s +// CHECK-POWERPC-AS-NOT: "-no-integrated-as" -- 2.7.4