Fix crash that could occur if closing the usercard quickly after blocking (#4711)
* Specifically, this adds a caller to the network request, which makes the success or failure callback not fire. This has the unintended consequence of the block list not reloading if the usercard is closed, but it's not a big concern. * Add unrelated `-DUSE_ALTERNATE_LINKER` cmake option From https://github.com/heavyai/heavydb/blob/0517d99b467806f6af7b4c969e351368a667497d/CMakeLists.txt#L87-L103
This commit is contained in:
@@ -49,6 +49,27 @@ elseif (CCACHE_PROGRAM)
|
||||
set(_compiler_launcher ${CCACHE_PROGRAM})
|
||||
endif ()
|
||||
|
||||
|
||||
# Alternate linker code taken from heavyai/heavydb
|
||||
# https://github.com/heavyai/heavydb/blob/0517d99b467806f6af7b4c969e351368a667497d/CMakeLists.txt#L87-L103
|
||||
macro(set_alternate_linker linker)
|
||||
find_program(LINKER_EXECUTABLE ld.${USE_ALTERNATE_LINKER} ${USE_ALTERNATE_LINKER})
|
||||
if(LINKER_EXECUTABLE)
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS 12.0.0)
|
||||
add_link_options("-ld-path=${USE_ALTERNATE_LINKER}")
|
||||
else()
|
||||
add_link_options("-fuse-ld=${USE_ALTERNATE_LINKER}")
|
||||
endif()
|
||||
else()
|
||||
set(USE_ALTERNATE_LINKER "" CACHE STRING "Use alternate linker" FORCE)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
set(USE_ALTERNATE_LINKER "" CACHE STRING "Use alternate linker. Leave empty for system default; alternatives are 'gold', 'lld', 'bfd', 'mold'")
|
||||
if(NOT "${USE_ALTERNATE_LINKER}" STREQUAL "")
|
||||
set_alternate_linker(${USE_ALTERNATE_LINKER})
|
||||
endif()
|
||||
|
||||
if (_compiler_launcher)
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER "${_compiler_launcher}" CACHE STRING "CXX compiler launcher")
|
||||
message(STATUS "Using ${_compiler_launcher} for speeding up build")
|
||||
|
||||
Reference in New Issue
Block a user