Hmm, something wasn't accepted in -Wl flags. clang -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -march=x86-64 -mtune=generic -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -Wl,--gc-sections -Wl,-plugin-opt,-function-sections -Wl,-plugin-opt,-data-sections CMakeFiles/cmTC_358cb.dir/testCCompiler.c.o -o cmTC_358cb && : /usr/bin/ld: bad -plugin-opt option clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed.
-plugin-opt is a gold linker option. Turn on gold linker with -fuse-ld=gold David On Sat, Oct 1, 2016 at 2:20 PM, Carsten Mattner via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hmm, something wasn't accepted in -Wl flags. > > clang -O2 -pipe -fstack-protector-strong > --param=ssp-buffer-size=4 -march=x86-64 -mtune=generic > -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu > -Wl,--gc-sections -Wl,-plugin-opt,-function-sections > -Wl,-plugin-opt,-data-sections CMakeFiles/cmTC_358cb.dir/ > testCCompiler.c.o > -o cmTC_358cb && : > > /usr/bin/ld: bad -plugin-opt option > > clang-3.9: error: linker command failed with exit code 1 (use -v to see > invocation) > > ninja: build stopped: subcommand failed. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161001/740bb1c3/attachment.html>
On Sun, Oct 2, 2016 at 12:47 AM, Xinliang David Li <xinliangli at gmail.com> wrote:> -plugin-opt is a gold linker option. Turn on gold linker with -fuse-ld=goldThanks, I'll add that to CFLAGS and CXXFLAGS on next try, although it seems to be gcc-specific.
On Sat, Oct 1, 2016 at 3:47 PM, Xinliang David Li <xinliangli at gmail.com> wrote:> -plugin-opt is a gold linker option. Turn on gold linker with > -fuse-ld=gold >But something is odd then - if the builds aren't using gold then I don't see how ThinLTO could have been kicking in? Teresa> David > > On Sat, Oct 1, 2016 at 2:20 PM, Carsten Mattner via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hmm, something wasn't accepted in -Wl flags. >> >> clang -O2 -pipe -fstack-protector-strong >> --param=ssp-buffer-size=4 -march=x86-64 -mtune=generic >> -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu >> -Wl,--gc-sections -Wl,-plugin-opt,-function-sections >> -Wl,-plugin-opt,-data-sections CMakeFiles/cmTC_358cb.dir/test >> CCompiler.c.o >> -o cmTC_358cb && : >> >> /usr/bin/ld: bad -plugin-opt option >> >> clang-3.9: error: linker command failed with exit code 1 (use -v to see >> invocation) >> >> ninja: build stopped: subcommand failed. >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > >-- Teresa Johnson | Software Engineer | tejohnson at google.com | 408-460-2413 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161001/89e9c58c/attachment.html>