Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -514,11 +514,20 @@ endif()
if (WIN32)
set(LIBS_BASE ${LIBS_BASE} winmm ws2_32)
elseif (NACL)
if (NOT USE_NACL_SAIGO)
find_library(NACL_EXCEPTION nacl_exception)
find_library(NACL_MINIDUMP minidump_generator)
set(LIBS_BASE ${LIBS_BASE} ${NACL_MINIDUMP} ${NACL_EXCEPTION})
find_library(NACL_EXCEPTION nacl_exception)
find_library(NACL_MINIDUMP minidump_generator)

# HACK: To be removed when Saigo is repackaged properly.
if (NOT NACL_MINIDUMP
# NACL_TARGET is specific to Saigo, PNaCl target is le32 and doesn't set NACL_TARGET.
AND "${NACL_TARGET}" STREQUAL "i686"
# x86_64-nacl/lib32 is specific to Google build, other builds may provide i686-nacl/lib instead.
AND EXISTS "${DEPS_DIR}/saigo_newlib/x86_64-nacl/lib32")
set(NACL_EXCEPTION "${DEPS_DIR}/saigo_newlib/x86_64-nacl/lib32/libnacl_exception.a")
set(NACL_MINIDUMP "${DEPS_DIR}/saigo_newlib/x86_64-nacl/lib32/libminidump_generator.a")
endif()

set(LIBS_BASE ${LIBS_BASE} ${NACL_MINIDUMP} ${NACL_EXCEPTION})
else()
find_library(LIBM m)
if (LIBM)
Expand Down
7 changes: 1 addition & 6 deletions src/common/System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <sys/random.h>
#endif
#ifdef __native_client__
#if !defined(__saigo__)
#include <nacl/nacl_exception.h>
#include <nacl/nacl_minidump.h>
#endif
#include <nacl/native_client/src/include/nacl/nacl_minidump.h>
#include <nacl/nacl_random.h>
#else
#include <dlfcn.h>
Expand Down Expand Up @@ -337,10 +334,8 @@ static void CrashHandler(const void* data, size_t n)

void SetupCrashHandler()
{
#if !defined(__saigo__)
nacl_minidump_register_crash_handler();
nacl_minidump_set_callback(CrashHandler);
#endif
}
#else
NORETURN static void CrashHandler(int sig)
Expand Down