summaryrefslogtreecommitdiffstats
path: root/lld/unittests/DriverTests/GnuLdDriverTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/unittests/DriverTests/GnuLdDriverTest.cpp')
-rw-r--r--lld/unittests/DriverTests/GnuLdDriverTest.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lld/unittests/DriverTests/GnuLdDriverTest.cpp b/lld/unittests/DriverTests/GnuLdDriverTest.cpp
index 5c2756331f4..102dcc0e4b8 100644
--- a/lld/unittests/DriverTests/GnuLdDriverTest.cpp
+++ b/lld/unittests/DriverTests/GnuLdDriverTest.cpp
@@ -199,6 +199,16 @@ TEST_F(GnuLdParserTest, AsNeeded) {
EXPECT_FALSE(cast<FileNode>(nodes[3].get())->asNeeded());
}
+// Emulation
+
+TEST_F(GnuLdParserTest, Emulation) {
+ EXPECT_TRUE(parse("mips-linux-gnu-ld", "a.o", "-m", "elf64ltsmip", nullptr));
+ EXPECT_EQ(Triple::mips64el, _ctx->getTriple().getArch());
+ EXPECT_TRUE(
+ parse("mips64el-linux-gnu-ld", "a.o", "-m", "elf32btsmip", nullptr));
+ EXPECT_EQ(Triple::mips, _ctx->getTriple().getArch());
+}
+
// Linker script
TEST_F(LinkerScriptTest, Input) {
OpenPOWER on IntegriCloud