diff options
| author | Simon Atanasyan <simon@atanasyan.com> | 2015-08-28 21:39:06 +0000 |
|---|---|---|
| committer | Simon Atanasyan <simon@atanasyan.com> | 2015-08-28 21:39:06 +0000 |
| commit | f12120cfe93018513743a1ebc0125ce688bc5ea0 (patch) | |
| tree | 6ba030bded648d51818ef2d83a6c51fccc79a842 /lld/unittests/DriverTests/GnuLdDriverTest.cpp | |
| parent | 6d39140b6e43f94e5e39b66254d082889d74200f (diff) | |
| download | bcm5719-llvm-f12120cfe93018513743a1ebc0125ce688bc5ea0.tar.gz bcm5719-llvm-f12120cfe93018513743a1ebc0125ce688bc5ea0.zip | |
[Mips] Make "emulation" option less dependent on the "-target" option.
Now it is possible to have mips-linux-gnu-ld executable and link MIPS 64-bit
little-endian binaries providing -melf64ltsmip command line argument.
llvm-svn: 246335
Diffstat (limited to 'lld/unittests/DriverTests/GnuLdDriverTest.cpp')
| -rw-r--r-- | lld/unittests/DriverTests/GnuLdDriverTest.cpp | 10 |
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) { |

