================ @@ -4675,7 +4676,7 @@ bool CompilerInvocation::CreateFromArgsImpl( // FIXME: We shouldn't have to pass the DashX option around here InputKind DashX = Res.getFrontendOpts().DashX; ParseTargetArgs(Res.getTargetOpts(), Args, Diags); - llvm::Triple T(Res.getTargetOpts().Triple); + llvm::Triple T(llvm::Triple::normalize(Res.getTargetOpts().Triple)); ---------------- bogner wrote:
IIUC `getTargetOpts().Triple` should *already* be normalized. The definition of the option includes a "Normalizer", like so: ``` def triple : Separate<["-"], "triple">, HelpText<"Specify target triple (e.g. i686-apple-darwin9)">, MarshallingInfoString<TargetOpts<"Triple">, "llvm::Triple::normalize(llvm::sys::getDefaultTargetTriple())">, AlwaysEmit, Normalizer<"normalizeTriple">; ``` So I think we shouldn't need the call to normalizer in CompilerInvocation at all, and we should look at the other places we're adding it to make sure they all make sense. https://github.com/llvm/llvm-project/pull/90809 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits