This is an archive of the discontinued LLVM Phabricator instance.

[Tooling] Fix broken dependency for shared build
ClosedPublic

Authored by etienneb on May 12 2016, 12:37 PM.

Details

Summary

There virtual destructor can't be found and cause a compilation error
on a shared build.

To repro: [Release + Shared]

-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON

Which produce this error:

tools/clang/unittests/Tooling/CMakeFiles/ToolingTests.dir/ToolingTest.cpp.o: In function `clang::tooling::newFrontendActionFactory_CreatesFrontendActionFactoryFromType_Test::TestBody()':
ToolingTest.cpp:(.text._ZN5clang7tooling66newFrontendActionFactory_CreatesFrontendActionFactoryFromType_Test8TestBodyEv+0x49): undefined reference to `clang::SyntaxOnlyAction::~SyntaxOnlyAction()'

Diff Detail

Event Timeline

etienneb updated this revision to Diff 57089.May 12 2016, 12:37 PM
etienneb retitled this revision from to [Tooling] Fix broken dependency for shared build.
etienneb updated this object.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.

note: To repro, you must compile the tests.

% ninja check-all
alexfh accepted this revision.May 12 2016, 12:42 PM
alexfh edited edge metadata.

LG

This revision is now accepted and ready to land.May 12 2016, 12:42 PM
etienneb closed this revision.May 12 2016, 12:57 PM