fixed emscripten detection (#897)
This commit is contained in:
parent
f545ff5e7d
commit
4056374800
1
.github/workflows/emscripten.yml
vendored
1
.github/workflows/emscripten.yml
vendored
@ -40,7 +40,6 @@ jobs:
|
||||
cmake -S . -B build_${{matrix.build_type}} \
|
||||
-DBUILD_SHARED_LIBS=${{matrix.lib == 'shared'}} \
|
||||
-DCMAKE_AR=$(which emar) \
|
||||
-DCMAKE_C_COMPILER=$(which emcc) \
|
||||
-DCMAKE_CXX_COMPILER=$(which em++) \
|
||||
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
|
||||
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
|
||||
|
||||
@ -503,15 +503,25 @@ if (WITH_SYMBOLIZE)
|
||||
if (HAVE_SYMBOLIZE)
|
||||
set (HAVE_STACKTRACE 1)
|
||||
endif (HAVE_SYMBOLIZE)
|
||||
elseif (UNIX OR (APPLE AND HAVE_DLADDR))
|
||||
elseif (UNIX)
|
||||
cmake_push_check_state (RESET)
|
||||
check_cxx_source_compiles ([=[
|
||||
int main()
|
||||
{
|
||||
#ifndef __ELF__
|
||||
#error __ELF__ not defined
|
||||
#endif
|
||||
}
|
||||
]=] HAVE_SYMBOLIZE)
|
||||
cmake_pop_check_state ()
|
||||
elseif (APPLE AND HAVE_DLADDR)
|
||||
set (HAVE_SYMBOLIZE 1)
|
||||
endif (WIN32 OR CYGWIN)
|
||||
endif (WITH_SYMBOLIZE)
|
||||
|
||||
# CMake manages symbolize availability. The definition is necessary only when
|
||||
# building the library. Switch to add_compile_definitions once we drop support
|
||||
# for CMake below version 3.12.
|
||||
add_definitions (-DGLOG_NO_SYMBOLIZE_DETECTION)
|
||||
# building the library.
|
||||
add_compile_definitions (GLOG_NO_SYMBOLIZE_DETECTION)
|
||||
|
||||
check_cxx_source_compiles ("
|
||||
#include <cstdlib>
|
||||
|
||||
@ -834,7 +834,7 @@ static ATTRIBUTE_NOINLINE bool SymbolizeAndDemangle(void *pc, char *out,
|
||||
|
||||
_END_GOOGLE_NAMESPACE_
|
||||
|
||||
#elif (defined(GLOG_OS_MACOSX) || defined(GLOG_OS_EMSCRIPTEN)) && defined(HAVE_DLADDR)
|
||||
#elif defined(GLOG_OS_MACOSX) && defined(HAVE_DLADDR)
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <cstring>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user