================
@@ -5404,23 +5401,76 @@ Action *Driver::ConstructPhaseAction(
     return C.MakeAction<BackendJobAction>(Input, types::TY_PP_Asm);
   }
   case phases::Assemble:
-    // When -marm64x is used, construct jobs for the EC and native targets and
-    // merge them into an archive with llvm-objcopy.
-    const llvm::Triple Target(llvm::Triple::normalize(TargetTriple));
-    if (Target.isOSWindows() && Args.hasArg(options::OPT_marm64x)) {
-      Action *Act =
-          C.MakeAction<AssembleJobAction>(std::move(Input), types::TY_Object);
-      ActionList Inputs;
-      Inputs.push_back(C.MakeAction<BindArchAction>(Act, 
BoundArch("aarch64")));
-      Inputs.push_back(C.MakeAction<BindArchAction>(Act, 
BoundArch("arm64ec")));
-      return C.MakeAction<ObjcopyJobAction>(Inputs, types::TY_Object);
-    }
     return C.MakeAction<AssembleJobAction>(std::move(Input), types::TY_Object);
   }
 
   llvm_unreachable("invalid phase in ConstructPhaseAction");
 }
 
+static bool isOffloadDeviceCC1JobCandidate(Command &Job) {
+  const Action &Source = Job.getSource();
+  if (!isa<CompileJobAction>(Source) && !isa<BackendJobAction>(Source))
+    return false;
+
+  if (Job.getBoundArch().empty() && !Source.getOffloadingArch().empty())
+    Job.setBoundArch(Source.getOffloadingArch());
+
+  if (Job.getBoundArch().empty())
+    return false;
+
+  const llvm::opt::ArgStringList &Args = Job.getArguments();
+  if (Args.empty() || StringRef(Args.front()) != "-cc1")
----------------
yxsamliu wrote:

Done. It now checks the clang tool instead of matching `-cc1`.

https://github.com/llvm/llvm-project/pull/208254
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to