From 1a2f6f4fe00e154a1822adb376338b1a4df4bed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 6 Sep 2025 15:19:50 +0200 Subject: [PATCH] [LLD] Recognize 'mipspe' as a PE target name --- lld/Common/DriverDispatcher.cpp | 2 +- lld/test/MinGW/driver.test | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lld/Common/DriverDispatcher.cpp b/lld/Common/DriverDispatcher.cpp index 34f0ed24b3df0..7c5f1cd3692ef 100644 --- a/lld/Common/DriverDispatcher.cpp +++ b/lld/Common/DriverDispatcher.cpp @@ -45,7 +45,7 @@ static cl::TokenizerCallback getDefaultQuotingStyle() { static bool isPETargetName(StringRef s) { return s == "i386pe" || s == "i386pep" || s == "thumb2pe" || s == "arm64pe" || - s == "arm64ecpe" || s == "arm64xpe"; + s == "arm64ecpe" || s == "arm64xpe" || s == "mipspe"; } static std::optional isPETarget(llvm::ArrayRef args) { diff --git a/lld/test/MinGW/driver.test b/lld/test/MinGW/driver.test index 618b888504320..47809d8a87495 100644 --- a/lld/test/MinGW/driver.test +++ b/lld/test/MinGW/driver.test @@ -296,6 +296,7 @@ RUN: not ld.lld -m i386pep --foo 2>&1 | FileCheck -check-prefix UNKNOWN_ARG %s UNKNOWN_ARG: error: unknown argument: --foo RUN: not ld.lld -m i386pep 2>&1 | FileCheck -check-prefix NO_INPUT_FILES %s +RUN: not ld.lld -m mipspe 2>&1 | FileCheck -check-prefix NO_INPUT_FILES %s NO_INPUT_FILES: error: no input files RUN: ld.lld -### -m i386pep foo.o 2>&1 | FileCheck -check-prefix ENABLE_AUTO_IMPORT %s