Skip to content

Conversation

@hpoussin
Copy link
Contributor

@hpoussin hpoussin commented Sep 9, 2025

No description provided.

@llvmbot llvmbot added the lld label Sep 9, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 9, 2025

@llvm/pr-subscribers-lld

Author: Hervé Poussineau (hpoussin)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/157742.diff

2 Files Affected:

  • (modified) lld/MinGW/Driver.cpp (+2)
  • (modified) lld/test/MinGW/driver.test (+6)
diff --git a/lld/MinGW/Driver.cpp b/lld/MinGW/Driver.cpp
index 5098dbd77b4fd..09ac501a2b71a 100644
--- a/lld/MinGW/Driver.cpp
+++ b/lld/MinGW/Driver.cpp
@@ -450,6 +450,8 @@ bool link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
       add("-machine:arm64ec");
     else if (s == "arm64xpe")
       add("-machine:arm64x");
+    else if (s == "mipspe")
+      add("-machine:mips");
     else
       error("unknown parameter: -m" + s);
   }
diff --git a/lld/test/MinGW/driver.test b/lld/test/MinGW/driver.test
index 47809d8a87495..ef03c01dd038f 100644
--- a/lld/test/MinGW/driver.test
+++ b/lld/test/MinGW/driver.test
@@ -37,6 +37,12 @@ ARM64X-SAME: -machine:arm64x
 ARM64X-SAME: -alternatename:__image_base__=__ImageBase
 ARM64X-SAME: foo.o
 
+RUN: ld.lld -### foo.o -m mipspe 2>&1 | FileCheck -check-prefix=MIPS %s
+MIPS:      -out:a.exe
+MIPS-SAME: -machine:mips
+MIPS-SAME: -alternatename:__image_base__=__ImageBase
+MIPS-SAME: foo.o
+
 RUN: ld.lld -### foo.o -m i386pep -shared 2>&1 | FileCheck -check-prefix=SHARED %s
 RUN: ld.lld -### foo.o -m i386pep --shared 2>&1 | FileCheck -check-prefix=SHARED %s
 RUN: ld.lld -### foo.o -m i386pep --dll 2>&1 | FileCheck -check-prefix=SHARED %s

@brad0 brad0 requested a review from jeremyd2019 October 10, 2025 09:15
@brad0
Copy link
Contributor

brad0 commented Oct 10, 2025

cc @mati865

@mati865
Copy link
Contributor

mati865 commented Oct 10, 2025

I don't see what the point is here. As far as I know, there is no (and won't be) Windows for MIPS.

@brad0
Copy link
Contributor

brad0 commented Oct 10, 2025

I don't see what the point is here. As far as I know, there is no (and won't be) Windows for MIPS.

There is in that there was Windows NT MIPS and there is support already in Clang and the other components.

@mati865
Copy link
Contributor

mati865 commented Oct 10, 2025

Thanks, I guess you learn something new every day.
Looks consistent with #121254

@jeremyd2019
Copy link
Contributor

Yeah, NT had MIPS and Alpha at least. Amazing that anybody is interested in those old targets though, I have enough trouble with people dropping i686 support already 😉

@brad0
Copy link
Contributor

brad0 commented Oct 10, 2025

Yeah, NT had MIPS and Alpha at least.

PowerPC too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants