Skip to content

Commit d8b6524

Browse files
authored
[LLD][MinGW] Handle MIPS machine (#157742)
1 parent 8ea5e20 commit d8b6524

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lld/MinGW/Driver.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,8 @@ bool link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
451451
add("-machine:arm64ec");
452452
else if (s == "arm64xpe")
453453
add("-machine:arm64x");
454+
else if (s == "mipspe")
455+
add("-machine:mips");
454456
else
455457
error("unknown parameter: -m" + s);
456458
}

lld/test/MinGW/driver.test

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ ARM64X-SAME: -machine:arm64x
3737
ARM64X-SAME: -alternatename:__image_base__=__ImageBase
3838
ARM64X-SAME: foo.o
3939

40+
RUN: ld.lld -### foo.o -m mipspe 2>&1 | FileCheck -check-prefix=MIPS %s
41+
MIPS: -out:a.exe
42+
MIPS-SAME: -machine:mips
43+
MIPS-SAME: -alternatename:__image_base__=__ImageBase
44+
MIPS-SAME: foo.o
45+
4046
RUN: ld.lld -### foo.o -m i386pep -shared 2>&1 | FileCheck -check-prefix=SHARED %s
4147
RUN: ld.lld -### foo.o -m i386pep --shared 2>&1 | FileCheck -check-prefix=SHARED %s
4248
RUN: ld.lld -### foo.o -m i386pep --dll 2>&1 | FileCheck -check-prefix=SHARED %s

0 commit comments

Comments
 (0)