mirror of https://github.com/oxen-io/lokinet
update clang bits for release
This commit is contained in:
parent
072ff9a50e
commit
be5e70f9eb
|
@ -93,14 +93,12 @@ endif()
|
|||
if (WOW64_CROSS_COMPILE OR WIN64_CROSS_COMPILE)
|
||||
# dynamic linking does this all the time
|
||||
if (USING_CLANG) # windows only, also set by toolchain file
|
||||
option(NO_LIBGCC "use compiler-rt instead" OFF)
|
||||
option(NO_LIBGCC "use libunwind+compiler-rt instead, must already be installed in mingw-w64 sysroot" OFF)
|
||||
add_compile_options(-Wno-unused-command-line-argument -Wno-c++11-narrowing)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:C>:-Wno-bad-function-cast>)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--allow-multiple-definition")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition")
|
||||
if (NO_LIBGCC)
|
||||
set(CMAKE_CXX_STANDARD_LIBRARIES "-lgcc_eh ${CMAKE_CXX_STANDARD_LIBRARIES}")
|
||||
set(CMAKE_C_STANDARD_LIBRARIES "-lgcc_eh ${CMAKE_C_STANDARD_LIBRARIES}")
|
||||
set(CMAKE_CXX_STANDARD_LIBRARIES "-lunwind -lpsapi ${CMAKE_CXX_STANDARD_LIBRARIES}")
|
||||
set(CMAKE_C_STANDARD_LIBRARIES "-lunwind -lpsapi ${CMAKE_C_STANDARD_LIBRARIES}")
|
||||
endif(NO_LIBGCC)
|
||||
else()
|
||||
# found it. this is GNU only
|
||||
|
@ -141,7 +139,7 @@ find_package(Threads REQUIRED)
|
|||
if(STATIC_LINK_RUNTIME)
|
||||
add_compile_options(-static)
|
||||
if(USING_CLANG)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static -static-libstdc++ -pthread" )
|
||||
else()
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive" )
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
|
||||
|
|
|
@ -5,7 +5,7 @@ add_definitions("-DWINNT_CROSS_COMPILE")
|
|||
|
||||
# target environment on the build host system
|
||||
# second one is for non-root installs
|
||||
set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX} /home/$ENV{USER}/mingw32 /home/$ENV{USER}/mingw32/${TOOLCHAIN_PREFIX})
|
||||
set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX} /opt/mingw32 /home/$ENV{USER}/mingw32 /home/$ENV{USER}/mingw32/${TOOLCHAIN_PREFIX})
|
||||
|
||||
# modify default behavior of FIND_XXX() commands
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
|
|
|
@ -1793,6 +1793,7 @@ auto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decl
|
|||
// Structured Bindings Support to the iteration_proxy_value class
|
||||
// For further reference see https://blog.tartanllama.xyz/structured-bindings/
|
||||
// And see https://github.com/nlohmann/json/pull/1391
|
||||
#ifndef __clang__
|
||||
namespace std
|
||||
{
|
||||
template <typename IteratorType>
|
||||
|
@ -1808,7 +1809,7 @@ class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >>
|
|||
::nlohmann::detail::iteration_proxy_value<IteratorType >> ()));
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
namespace nlohmann
|
||||
{
|
||||
namespace detail
|
||||
|
|
Loading…
Reference in New Issue