llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang-driver Author: None (ZijunZhaoCCK) <details> <summary>Changes</summary> Add isWasm() check for here: https://github.com/llvm/llvm-project/pull/78655#issuecomment-1928075569 --- Full diff: https://github.com/llvm/llvm-project/pull/80783.diff 1 Files Affected: - (modified) clang/lib/Driver/Driver.cpp (+12-10) ``````````diff diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 29db9543f36553..04d02ea500d19f 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -1443,16 +1443,18 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) { const ToolChain &TC = getToolChain( *UArgs, computeTargetTriple(*this, TargetTriple, *UArgs)); - // Check if the environment version is valid. - llvm::Triple Triple = TC.getTriple(); - StringRef TripleVersionName = Triple.getEnvironmentVersionString(); - StringRef TripleObjectFormat = - Triple.getObjectFormatTypeName(Triple.getObjectFormat()); - if (Triple.getEnvironmentVersion().empty() && TripleVersionName != "" && - TripleVersionName != TripleObjectFormat) { - Diags.Report(diag::err_drv_triple_version_invalid) - << TripleVersionName << TC.getTripleString(); - ContainsError = true; + // Check if the environment version is valid except wasm case. + if (!TC.getTriple().isWasm()) { + llvm::Triple Triple = TC.getTriple(); + StringRef TripleVersionName = Triple.getEnvironmentVersionString(); + StringRef TripleObjectFormat = + Triple.getObjectFormatTypeName(Triple.getObjectFormat()); + if (Triple.getEnvironmentVersion().empty() && TripleVersionName != "" && + TripleVersionName != TripleObjectFormat) { + Diags.Report(diag::err_drv_triple_version_invalid) + << TripleVersionName << TC.getTripleString(); + ContainsError = true; + } } // Report warning when arm64EC option is overridden by specified target `````````` </details> https://github.com/llvm/llvm-project/pull/80783 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits