<div dir="ltr">Hi Peeter,<div><br></div><div>Why do you have to make the dependency conditional on <span style="color:rgb(33,33,33)">BUILD_SHARED_LIBS</span>? If <span style="color:rgb(33,33,33)">lldbExpression depends on </span><span style="color:rgb(33,33,33)">LLVMRuntimeDyld it should depend on it independently of the build config.</span></div><div><span style="color:rgb(33,33,33)"><br></span></div><div>Also I gave it a try to build lldb using shared libraries locally and I haven't hit any issue when I used the following command (on Ubuntu 14.04): cmake ../../llvm -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=true</div><div><br></div><div>Are you using some other cmake flags as well? Also can you check the link command used for the final linking step if it contains LLVMRuntimeDyld without your change? Can it be just a library ordering issue where some symbols are dropped before they are used?</div><div><br></div><div>Cheers,</div><div>Tamas</div><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 30, 2017 at 12:50 AM Peeter Joot <<a href="mailto:peeterjoot@protonmail.com" target="_blank">peeterjoot@protonmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi Tamas,<br></div><div><br></div><div>I was able to use your suggestion as follows:<br></div><div><br></div><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p1"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1">diff --git a/source/Expression/CMakeLists.txt b/source/Expression/CMakeLists.txt</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p2"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1">index 7d9643a..b53b095 100644</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p1"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1">--- a/source/Expression/CMakeLists.txt</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p1"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1">+++ b/source/Expression/CMakeLists.txt</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p3"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s2">@@ -2,6 +2,12 @@</span><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1"> if(NOT LLDB_BUILT_STANDALONE)</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p2"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544Apple-converted-space">   </span>set(tablegen_deps intrinsics_gen)</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p2"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544Apple-converted-space"> </span>endif()</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p4"><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p5"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1">+set(LLDB_EXP_DEPS)</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p5"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1">+</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p5"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1">+if(BUILD_SHARED_LIBS)</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p5"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1">+<span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544Apple-converted-space">  </span>list(APPEND LLDB_EXP_DEPS LLVMRuntimeDyld)</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p5"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1">+endif()</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p5"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1">+</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p2"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544Apple-converted-space"> </span>add_lldb_library(lldbExpression</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p2"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544Apple-converted-space">   </span>DiagnosticManager.cpp</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p2"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544Apple-converted-space">   </span>DWARFExpression.cpp</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p3"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s2">@@ -30,6 +36,7 @@</span><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1"> add_lldb_library(lldbExpression</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p2"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544Apple-converted-space">     </span>lldbTarget</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p2"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544Apple-converted-space">     </span>lldbUtility</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p2"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544Apple-converted-space">     </span>lldbPluginExpressionParserClang</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p5"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1">+<span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544Apple-converted-space">    </span>${LLDB_EXP_DEPS}</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p4"><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p2"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544Apple-converted-space">   </span>LINK_COMPONENTS</span><br></p><p class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544p2"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544s1"><span class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544Apple-converted-space">     </span>Core</span><br></p><div><br></div><div>and was able to successfully build the lldb-server.</div><div><br></div><div class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544protonmail_signature_block"><div class="m_-7257436826166237358m_5591264471178906353m_-1896203252763068544protonmail_signature_block-user"><div>--<br></div><div>Peeter<br></div></div></div><div><br></div></blockquote></div></div></div>