[LLD][MinGW] Handle MIPS machine (#157742)

This commit is contained in:
Hervé Poussineau
2025-11-23 10:41:31 +01:00
committed by GitHub
parent 8ea5e20ce4
commit d8b6524d31
2 changed files with 8 additions and 0 deletions

View File

@@ -451,6 +451,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);
}

View File

@@ -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