[cfe-dev] [diff] -integrated-as in OpenBSD

Vladimir Kirillov proger at uaoug.org.ua
Sun Nov 7 13:59:57 PST 2010


Hello, cfe-dev!

Please commit this, we want this shiny feature enabled too :)
-------------- next part --------------
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 126e3fd..24bb355 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -1043,11 +1043,20 @@ Tool &OpenBSD::SelectTool(const Compilation &C, const JobAction &JA) const {
   else
     Key = JA.getKind();
 
+  bool UseIntegratedAs = C.getArgs().hasFlag(options::OPT_integrated_as,
+                                             options::OPT_no_integrated_as,
+                                             IsIntegratedAssemblerDefault());
+
   Tool *&T = Tools[Key];
   if (!T) {
     switch (Key) {
-    case Action::AssembleJobClass:
-      T = new tools::openbsd::Assemble(*this); break;
+    case Action::AssembleJobClass: {
+      if (UseIntegratedAs)
+        T = new tools::ClangAs(*this);
+      else
+        T = new tools::openbsd::Assemble(*this);
+      break;
+    }
     case Action::LinkJobClass:
       T = new tools::openbsd::Link(*this); break;
     default:


More information about the cfe-dev mailing list