Due to recent changes, rebuilding with cmake and ninja in an existing build on OSX gets the following linker errors (note: it builds fine from scratch):
$ ninja . . . Undefined symbols for architecture x86_64: "_liblldb_coreVersionString", referenced from: lldb_private::GetVersion() in lldb.cpp.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) . . . ninja: build stopped: subcommand failed. I've tried to fix this wirth the attached patch, but it gets a warning about multiple rules for LLDB_vers.c: $ ninja [1/1] Re-running CMake... . . . ninja: warning: multiple rules generate tools/lldb/source/LLDB_vers.c. builds involving this target will not be correct; continuing anyway . . . [13/13] Creating executable symlink bin/lldb Does anyone know how to fix this the right way to avoid these warnings? BTW, anyone know why I also get the following warnings? (They are unrelated to the linker error or the patch, but just curious): . . . [6/13] Linking CXX shared library lib/liblldb.3.8.0.dylib ld: warning: cannot export hidden symbol lldb::SBListener::GetSP() from tools/lldb/source/API/CMakeFiles/liblldb.dir/SBAttachInfo.cpp.o ld: warning: cannot export hidden symbol lldb::SBListener::GetSP() from tools/lldb/source/API/CMakeFiles/liblldb.dir/SBLaunchInfo.cpp.o . . . ld: warning: cannot export hidden symbol lldb::endian::InlHostByteOrder() from lib/liblldbExpression.a(IRForTarget.cpp.o) [13/13] Creating executable symlink bin/lldb Thanks in advance, -Dawn
Index: tools/lldb-server/CMakeLists.txt =================================================================== --- tools/lldb-server/CMakeLists.txt (revision 248581) +++ tools/lldb-server/CMakeLists.txt (working copy) @@ -35,8 +35,13 @@ lldb-server.cpp LLDBServerUtilities.cpp ../../source/lldb.cpp + ${LLDB_VERS_GENERATED_FILE} ) + if (LLDB_VERS_GENERATED_FILE) + add_dependencies(lldb-server swig_wrapper) + endif() + # The Darwin linker doesn't understand --start-group/--end-group. if (LLDB_LINKER_SUPPORTS_GROUPS) target_link_libraries(lldb-server
_______________________________________________ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev