[Sanitizer] Compile sanitizer runtimes with -Wno-non-virtual-dtor. Virtual dtors may be a problem for us, as sanitizer runtime should not generally assume libstdc++ presence.
llvm-svn: 177860
This commit is contained in:
parent
31a2c483ed
commit
acfb82e611
|
@ -147,6 +147,12 @@ check_cxx_compiler_flag(-Wno-c99-extensions SUPPORTS_NO_C99_EXTENSIONS_FLAG)
|
||||||
if(SUPPORTS_NO_C99_EXTENSIONS_FLAG)
|
if(SUPPORTS_NO_C99_EXTENSIONS_FLAG)
|
||||||
list(APPEND SANITIZER_COMMON_CFLAGS -Wno-c99-extensions)
|
list(APPEND SANITIZER_COMMON_CFLAGS -Wno-c99-extensions)
|
||||||
endif()
|
endif()
|
||||||
|
# Sanitizer may not have libstdc++, so we can have problems with virtual
|
||||||
|
# destructors.
|
||||||
|
check_cxx_compiler_flag(-Wno-non-virtual-dtor SUPPORTS_NO_NON_VIRTUAL_DTOR_FLAG)
|
||||||
|
if (SUPPORTS_NO_NON_VIRTUAL_DTOR_FLAG)
|
||||||
|
list(APPEND SANITIZER_COMMON_CFLAGS -Wno-non-virtual-dtor)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Setup min Mac OS X version.
|
# Setup min Mac OS X version.
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
|
|
@ -22,11 +22,10 @@ ThreadContextBase::ThreadContextBase(u32 tid)
|
||||||
name[0] = '\0';
|
name[0] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SANITIZER_GO
|
|
||||||
ThreadContextBase::~ThreadContextBase() {
|
ThreadContextBase::~ThreadContextBase() {
|
||||||
|
// ThreadContextBase should never be deleted.
|
||||||
CHECK(0);
|
CHECK(0);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
void ThreadContextBase::SetName(const char *new_name) {
|
void ThreadContextBase::SetName(const char *new_name) {
|
||||||
name[0] = '\0';
|
name[0] = '\0';
|
||||||
|
|
|
@ -34,10 +34,7 @@ enum ThreadStatus {
|
||||||
class ThreadContextBase {
|
class ThreadContextBase {
|
||||||
public:
|
public:
|
||||||
explicit ThreadContextBase(u32 tid);
|
explicit ThreadContextBase(u32 tid);
|
||||||
#ifndef SANITIZER_GO // Go does not have libstdc++
|
~ThreadContextBase(); // Should never be called.
|
||||||
virtual
|
|
||||||
#endif
|
|
||||||
~ThreadContextBase();
|
|
||||||
|
|
||||||
const u32 tid; // Thread ID. Main thread should have tid = 0.
|
const u32 tid; // Thread ID. Main thread should have tid = 0.
|
||||||
u64 unique_id; // Unique thread ID.
|
u64 unique_id; // Unique thread ID.
|
||||||
|
|
Loading…
Reference in New Issue