https://llvm.org/bugs/show_bug.cgi?id=31027
Bug ID: 31027 Summary: thinlto link failure Product: clang Version: 3.9 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: C++ Assignee: unassignedclangb...@nondot.org Reporter: parag.warud...@gmail.com CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Classification: Unclassified Trying to build ZeroC ICE (https://zeroc.com/distributions/ice#source) on Ubuntu 14.04 using clang++-3.9. /usr/bin/ld is symlinked to /usr/bin/ld.gold. The build fails in <SRC>/cpp/src/slice2cs directory if -flto=thin is used. clang++-3.9 -rdynamic -m64 -flto=thin -fvisibility=hidden -Wall -Werror -pthread -fPIC -g -L../../lib/x86_64-linux-gnu -Wl,--disable-new-dtags -Wl,-rpath,\$ORIGIN/../lib/x86_64-linux-gnu -o ../../bin/slice2cs Gen.o Main.o -lSlice -lIceUtil Gen.cpp:2996: error: undefined reference to 'Slice::Gen::TieVisitor::TieVisitor(IceUtilInternal::Output&)' Gen.cpp:3003: error: undefined reference to 'Slice::Gen::ImplVisitor::ImplVisitor(IceUtilInternal::Output&)' Gen.cpp:3010: error: undefined reference to 'Slice::Gen::ImplTieVisitor::ImplTieVisitor(IceUtilInternal::Output&)' clang: error: linker command failed with exit code 1 (use -v to see invocation) Replacing the -flto=thin with just -flto and keeping the same rest of the command line the link succeeds. I am not sure however since normal LTO succeeds, it looks like this is a bug with ThinLTO? [ If anyone wants to reproduce this, ICE is easy to build with few dependencies -mcpp, libssl-dev etc- and requires passing CXX=clang++-3.9 to make along with modifying the Make.rules.Linux to treat clang++-3.9 as g++ and adding -flto=thin to CXXFLAGS.] -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs