Commit 3713c573 authored by Edward Catmur's avatar Edward Catmur

Fix link errors with -fsanitize=vptr

[ 66%] Linking CXX executable capnpc-c++
cd /home/edward.catmur/build/capnproto@master/c++/src/capnp && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/capnpc_cpp.dir/link.txt --verbose=1
/usr/lib64/icecc/bin/c++   -fsanitize=vptr   CMakeFiles/capnpc_cpp.dir/compiler/capnpc-c++.c++.o  -o capnpc-c++ -rdynamic libcapnp.a ../kj/libkj.a -lpthread
libcapnp.a(layout.c++.o):(.data+0x38): undefined reference to `typeinfo for capnp::ClientHook'
libcapnp.a(layout.c++.o):(.data+0x3b8): undefined reference to `typeinfo for capnp::ClientHook'
collect2: error: ld returned 1 exit status

$ g++ --version
g++ (GCC) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
parent f4309eac
......@@ -61,10 +61,6 @@ ClientHook::ClientHook() {
setGlobalBrokenCapFactoryForLayoutCpp(brokenCapFactory);
}
void* ClientHook::getLocalServer(_::CapabilityServerSetBase& capServerSet) {
return nullptr;
}
// =======================================================================================
Capability::Client::Client(decltype(nullptr))
......
......@@ -55,6 +55,10 @@ void setGlobalBrokenCapFactoryForLayoutCpp(BrokenCapFactory& factory) {
const uint ClientHook::NULL_CAPABILITY_BRAND = 0;
// Defined here rather than capability.c++ so that we can safely call isNull() in this file.
void* ClientHook::getLocalServer(_::CapabilityServerSetBase& capServerSet) {
return nullptr;
}
namespace _ { // private
#endif // !CAPNP_LITE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment