================
@@ -1286,6 +1299,16 @@ Compilation *Driver::BuildCompilation(ArrayRef<const 
char *> ArgList) {
           appendOneArg(Args, Opt, nullptr);
         }
     }
+
+    // The config file may have changed the architecture so apply it.
+    if (HasConfigFile && Args.hasArg(options::OPT__SLASH_arm64EC)) {
+      llvm::Triple T(TargetTriple);
+      if (T.getArch() != llvm::Triple::aarch64 ||
+          T.getSubArch() != llvm::Triple::AArch64SubArch_arm64ec) {
+        T.setArch(llvm::Triple::aarch64, llvm::Triple::AArch64SubArch_arm64ec);
+        TargetTriple = T.str();
----------------
zmodem wrote:

The PR description only mentions moving the default triple calculation earlier, 
but not this part.

The config file can presumably change many things, so why does the target 
triple need special handling? Also what about flags that affect x86 vs. x86_64 
(-m32 and -m64), do we need to handle those too?

https://github.com/llvm/llvm-project/pull/111397
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to