<div dir="ltr">I tried to build using the following command what should be a reasonably close approximation to the one you used (I don't have ICU installed at the moment) and it still links fine for me:<div>CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -G Ninja ../../llvm -DBUILD_SHARED_LIBS=true -DLLVM_TARGETS_TO_BUILD='X86' -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_ASSERTIONS=TRUE -DLLVM_OPTIMIZED_TABLEGEN=ON</div><div><br></div><div>It would be great to understand what exactly causes the difference between the 2 cases by some sort of bisecting as I see nothing in the source code what would explain this. If changing from <span style="color:rgb(33,33,33)">-DCMAKE_BUILD_TYPE=Debug to </span><span style="color:rgb(33,33,33)">-DCMAKE_BUILD_TYPE=Release fixes the issue then it would be nice to diff the ninja build graph and the different cmake caches to try to figure out where the different starts.</span></div><div><span style="color:rgb(33,33,33)"><br></span></div><div><span style="color:rgb(33,33,33)">Tamas</span></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 30, 2017 at 12:17 PM Peeter Joot <<a href="mailto:peeterjoot@protonmail.com">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>It looks like lldb-server only fails if I build with a Debug configuration, which I didn't realize until now.  In Release configuration, I don't need any changes to CMakefiles and lldb-server links without error.  My full build configuration in debug mode was:<br></div><p class="m_-7254392103937225917p1"><span class="m_-7254392103937225917s1">mkdir lldb50.1708110153</span><br></p><p class="m_-7254392103937225917p1"><span class="m_-7254392103937225917s1">cd lldb50.1708110153</span><br></p><p class="m_-7254392103937225917p1"><span class="m_-7254392103937225917s1">PATH=$PATH:/opt/lzlabs/bin</span><br></p><p class="m_-7254392103937225917p1"><span class="m_-7254392103937225917s1">CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake \</span><br></p><p class="m_-7254392103937225917p1"><span class="m_-7254392103937225917s1">-G \</span><br></p><p class="m_-7254392103937225917p1"><span class="m_-7254392103937225917s1">Ninja \</span><br></p><p class="m_-7254392103937225917p1"><span class="m_-7254392103937225917s1">../llvm \</span><br></p><p class="m_-7254392103937225917p1"><span class="m_-7254392103937225917s1">-DBUILD_SHARED_LIBS=true \</span><br></p><p class="m_-7254392103937225917p1"><span class="m_-7254392103937225917s1">-DLLVM_TARGETS_TO_BUILD='X86' \</span><br></p><p class="m_-7254392103937225917p1"><span class="m_-7254392103937225917s1">-DCMAKE_BUILD_TYPE=Debug \</span><br></p><p class="m_-7254392103937225917p1"><span class="m_-7254392103937225917s1">-DLLVM_ENABLE_ASSERTIONS=TRUE \</span><br></p><p class="m_-7254392103937225917p1"><span class="m_-7254392103937225917s1">-DCMAKE_INSTALL_PREFIX=/home/pjoot/clang/lldb50.1708110153 \</span><br></p><p class="m_-7254392103937225917p1"><span class="m_-7254392103937225917s1">-DLLVM_OPTIMIZED_TABLEGEN=ON \</span><br></p><p class="m_-7254392103937225917p1"><span class="m_-7254392103937225917s1">-DICU_LIBRARY=/opt/lzlabs/lib64 \</span><br></p><p class="m_-7254392103937225917p1"><span class="m_-7254392103937225917s1">-DICU_INCLUDE_DIR=/opt/lzlabs/include</span><br></p><div>Without any changes LLVMRuntimeDyld is not in the lldb-server link list, so this is not an ordering issue.  I'm not sure why this ends up as an issue only with Debug.<br></div><div><br></div><div class="m_-7254392103937225917protonmail_signature_block"><div class="m_-7254392103937225917protonmail_signature_block-user"><div>--<br></div><div>Peeter<br></div></div></div><div><br></div></blockquote></div>