Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lld/Common/DriverDispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "arm64ecpe" || s == "arm64xpe";
}

static std::optional<bool> isPETarget(llvm::ArrayRef<const char *> args) {
Expand Down
2 changes: 2 additions & 0 deletions lld/MinGW/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,8 @@ bool link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
add("-machine:arm64");
else if (s == "arm64ecpe")
add("-machine:arm64ec");
else if (s == "arm64xpe")
add("-machine:arm64x");
else
error("unknown parameter: -m" + s);
}
Expand Down
6 changes: 6 additions & 0 deletions lld/test/MinGW/driver.test
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ ARM64EC-SAME: -machine:arm64ec
ARM64EC-SAME: -alternatename:__image_base__=__ImageBase
ARM64EC-SAME: foo.o

RUN: ld.lld -### foo.o -m arm64xpe 2>&1 | FileCheck -check-prefix=ARM64X %s
ARM64X: -out:a.exe
ARM64X-SAME: -machine:arm64x
ARM64X-SAME: -alternatename:__image_base__=__ImageBase
ARM64X-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
Expand Down