From: Matt Morehouse Date: Thu, 12 Jul 2018 18:09:03 +0000 (+0000) Subject: [libFuzzer] Use lld-available for gc-sections.test. X-Git-Tag: llvmorg-7.0.0-rc1~1593 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d507c96ff15fce920589c004d8cc10a104b5ac3c;p=platform%2Fupstream%2Fllvm.git [libFuzzer] Use lld-available for gc-sections.test. The lld feature is never available for libFuzzer tests, so gc-sections.test never actually runs. llvm-svn: 336926 --- diff --git a/compiler-rt/test/fuzzer/gc-sections.test b/compiler-rt/test/fuzzer/gc-sections.test index f831688..7bc2f83 100644 --- a/compiler-rt/test/fuzzer/gc-sections.test +++ b/compiler-rt/test/fuzzer/gc-sections.test @@ -1,11 +1,11 @@ -REQUIRES: linux, lld +REQUIRES: linux, lld-available No gc-sections: RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t RUN: nm %t | grep UnusedFunctionShouldBeRemovedByLinker | count 1 With gc-sections. Currently, we can't remove unused code. -RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t -ffunction-sections -Wl,-gc-sections +RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t -fuse-ld=lld -ffunction-sections -Wl,-gc-sections RUN: nm %t | not grep UnusedFunctionShouldBeRemovedByLinker With gc sections, with trace-pc. Unused code is removed.