[PATCH] D140637: [InlineOrder] Plugin Inline Order
Tomas Matheson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 23 06:59:31 PDT 2023
tmatheson added a comment.
This test fails when I build and run with the following:
cmake ../llvm -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON -DLLVM_ENABLE_PLUGINS=ON -DBUILD_SHARED_LIBS=OFF -DLLVM_ENABLE_PROJECTS=clang
ninja unittests/Analysis/AnalysisTests
./unittests/Analysis/AnalysisTests --gtest_filter=PluginInlineOrderTest.NoInlineFoo
I get the following failure:
$ ./unittests/Analysis/AnalysisTests --gtest_filter=PluginInlineOrderTest.NoInlineFoo
Note: Google Test filter = PluginInlineOrderTest.NoInlineFoo
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from PluginInlineOrderTest
[ RUN ] PluginInlineOrderTest.NoInlineFoo
/ssd/upstream/llvm/unittests/Analysis/PluginInlineOrderAnalysisTest.cpp:48: Failure
Value of: !!Plugin
Actual: false
Expected: true
Plugin path: /ssd/upstream/build2/unittests/Analysis/InlineOrderPlugin.so
[ FAILED ] PluginInlineOrderTest.NoInlineFoo (4 ms)
[----------] 1 test from PluginInlineOrderTest (4 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (4 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] PluginInlineOrderTest.NoInlineFoo
1 FAILED TEST
The error returned by `CI.setupPlugin()` is `InlineOrderPlugin.so: undefined symbol: _ZN4llvm13AllAnalysesOnINS_6ModuleEE6SetKeyE"`.
This symbol is `llvm::AllAnalysesOn<llvm::Module>::SetKey` defined in LLVMCore. It is present in the unit test executable but is a local symbol:
$ readelf -s -W ./unittests/Analysis/AnalysisTests | rg _ZN4llvm13AllAnalysesOnINS_6ModuleEE6SetKeyE
41264: 0000000001c79738 8 OBJECT LOCAL DEFAULT 29 _ZN4llvm13AllAnalysesOnINS_6ModuleEE6SetKeyE
Therefore it is not resolved by the `dlopen`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140637/new/
https://reviews.llvm.org/D140637
More information about the llvm-commits
mailing list