From 77afc71426583aba34e45a4ef1b64dd0ac3f8118 Mon Sep 17 00:00:00 2001 From: Nick Kledzik Date: Thu, 21 Aug 2014 20:25:50 +0000 Subject: [mach-o] Fix initial live atoms with -dead_strip When -dead_strip is used with -exported_symbols_list the initial set of live atoms are those in the export list. llvm-svn: 216213 --- lld/unittests/DriverTests/DarwinLdDriverTest.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lld/unittests/DriverTests/DarwinLdDriverTest.cpp') diff --git a/lld/unittests/DriverTests/DarwinLdDriverTest.cpp b/lld/unittests/DriverTests/DarwinLdDriverTest.cpp index 3c17ca9e4cb..cf0da9dd099 100644 --- a/lld/unittests/DriverTests/DarwinLdDriverTest.cpp +++ b/lld/unittests/DriverTests/DarwinLdDriverTest.cpp @@ -79,17 +79,18 @@ TEST_F(DarwinLdParserTest, OutputPath) { } TEST_F(DarwinLdParserTest, DeadStrip) { - EXPECT_TRUE(parse("ld", "-dead_strip", "foo.o", nullptr)); + EXPECT_TRUE(parse("ld", "-arch", "x86_64", "-dead_strip", "foo.o", nullptr)); EXPECT_TRUE(_context.deadStrip()); } TEST_F(DarwinLdParserTest, DeadStripRootsExe) { - EXPECT_TRUE(parse("ld", "-dead_strip", "foo.o", nullptr)); + EXPECT_TRUE(parse("ld", "-arch", "x86_64", "-dead_strip", "foo.o", nullptr)); EXPECT_FALSE(_context.globalsAreDeadStripRoots()); } TEST_F(DarwinLdParserTest, DeadStripRootsDylib) { - EXPECT_TRUE(parse("ld", "-dylib", "-dead_strip", "foo.o", nullptr)); + EXPECT_TRUE(parse("ld", "-arch", "x86_64", "-dylib", "-dead_strip", "foo.o", + nullptr)); EXPECT_TRUE(_context.globalsAreDeadStripRoots()); } -- cgit v1.2.3