Author: Hervé Poussineau Date: 2025-01-05T15:20:16+08:00 New Revision: 8267bea9a35c3c3f866b942a50c2b98ac462ce35
URL: https://github.com/llvm/llvm-project/commit/8267bea9a35c3c3f866b942a50c2b98ac462ce35 DIFF: https://github.com/llvm/llvm-project/commit/8267bea9a35c3c3f866b942a50c2b98ac462ce35.diff LOG: [Clang][MIPS] Send correct architecture for MinGW toolchains (#121042) 'mipspe' name was chosen by binutils, when the project was able to create executables for Windows CE/MIPS. Added: Modified: clang/lib/Driver/ToolChains/MinGW.cpp clang/test/Driver/mingw.cpp Removed: ################################################################################ diff --git a/clang/lib/Driver/ToolChains/MinGW.cpp b/clang/lib/Driver/ToolChains/MinGW.cpp index 963de81027ca9f..9f0c6160a309ec 100644 --- a/clang/lib/Driver/ToolChains/MinGW.cpp +++ b/clang/lib/Driver/ToolChains/MinGW.cpp @@ -138,6 +138,9 @@ void tools::MinGW::Linker::ConstructJob(Compilation &C, const JobAction &JA, else CmdArgs.push_back("arm64pe"); break; + case llvm::Triple::mipsel: + CmdArgs.push_back("mipspe"); + break; default: D.Diag(diag::err_target_unknown_triple) << TC.getEffectiveTriple().str(); } diff --git a/clang/test/Driver/mingw.cpp b/clang/test/Driver/mingw.cpp index 9790c86a364f85..66da0c97f41668 100644 --- a/clang/test/Driver/mingw.cpp +++ b/clang/test/Driver/mingw.cpp @@ -85,6 +85,10 @@ // RUN: | FileCheck %s --check-prefix CHECK_MINGW_EC_LINK // CHECK_MINGW_EC_LINK: "-m" "arm64ecpe" +// RUN: %clang --target=mipsel-windows-gnu -### -o /dev/null %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix CHECK_MINGW_MIPSPE +// CHECK_MINGW_MIPSPE: "-m" "mipspe" + // RUN: %clang --target=i686-windows-gnu -fms-hotpatch -### -- %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=FUNCTIONPADMIN // FUNCTIONPADMIN: "--functionpadmin" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits