Skip to content
Open
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
2 changes: 1 addition & 1 deletion deps/uv/.readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2

sphinx:
builder: html
configuration: null
configuration: docs/src/conf.py
fail_on_warning: false

build:
Expand Down
56 changes: 56 additions & 0 deletions deps/uv/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -548,3 +548,59 @@ liuxiang88 <94350585+liuxiang88@users.noreply.github.com>
Jeffrey H. Johnson <trnsz@pobox.com>
Abdirahim Musse <33973272+abmusse@users.noreply.github.com>
小明 <7737673+caobug@users.noreply.github.com>
Shuduo Sang <sangshuduo@gmail.com>
Keith Winstein <keithw@cs.stanford.edu>
michalbiesek <michalbiesek@gmail.com>
Alois Klink <alois@aloisklink.com>
SmorkalovG <smorkalov.g@gmail.com>
Pleuvens <pleuvens.fervil@gmail.com>
jolai <58589285+laijonathan@users.noreply.github.com>
Julien Roncaglia <fox@vbfox.net>
prubel <paul@rubels.net>
Per Allansson <65364157+per-allansson@users.noreply.github.com>
Matheus Izvekov <mizvekov@gmail.com>
Christian Heimlich <chris@pcserenity.com>
Hao Hu <33607772+hhu8@users.noreply.github.com>
matoro <12038583+matoro@users.noreply.github.com>
Bo Anderson <mail@boanderson.me>
Ardi Nugraha <33378542+ardi-nugraha@users.noreply.github.com>
Anton Bachin <antonbachin@yahoo.com>
Trevor Flynn <trevorflynn@liquidcrystalstudios.com>
Andy Pan <panjf2000@gmail.com>
Viacheslav Muravyev <slavamuravey@mail.ru>
Anthony Alayo <anthony.alayo@gmail.com>
Thomas Walter <31201229+waltoss@users.noreply.github.com>
hiiizxf <385122613@qq.com>
Geddy <guandichao@163.com>
Farzin Monsef <monseffarzin@gmail.com>
tgolang <154592711+tgolang@users.noreply.github.com>
josedelinux <josedelinux@hotmail.com>
Hüseyin Açacak <110401522+huseyinacacak-janea@users.noreply.github.com>
Uilian Ries <uilianries@gmail.com>
Olivier Valentin <ovalenti@redhat.com>
郑苏波 (Super Zheng) <superzheng@tencent.com>
zeertzjq <zeertzjq@outlook.com>
Ian Butterworth <i.r.butterworth@gmail.com>
握猫猫 <164346864@qq.com>
Zuohui Yang <274048862@qq.com>
Edigleysson Silva (Edy) <edigleyssonsilva@gmail.com>
Raihaan Shouhell <raihaanhimself@gmail.com>
Rialbat <miha-wead@mail.ru>
Adam <adam@NetBSD.org>
Poul T Lomholt <ptlomholt@users.noreply.github.com>
Thad House <ThadHouse@users.noreply.github.com>
Julian A Avar C <28635807+julian-a-avar-c@users.noreply.github.com>
amcgoogan <105525867+amcgoogan@users.noreply.github.com>
Rafael Gonzaga <rafael.nunu@hotmail.com>
Morten Engelhardt Olsen <moro.engelhardt@gmail.com>
Andrey <bag@zurbagan.org>
Julio Jordán <juliojjordanp@outlook.com>
Jinho Jang <verycosy@kakao.com>
Velikiy Kirill <kuklix@ya.ru>
rainlow <37818892+rainlow@users.noreply.github.com>
Paolo Insogna <paolo@cowtech.it>
Robert Nagy <robert@openbsd.org>
mugitya03 <mugitya233@outlook.com>
Itay Bookstein <ibookstein@gmail.com>
crupest <crupest@outlook.com>
AE1020 <68134252+AE1020@users.noreply.github.com>
66 changes: 55 additions & 11 deletions deps/uv/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4)
cmake_minimum_required(VERSION 3.10)

if(POLICY CMP0091)
cmake_policy(SET CMP0091 NEW) # Enable MSVC_RUNTIME_LIBRARY setting
Expand All @@ -20,7 +20,7 @@ include(CTest)
set(CMAKE_C_VISIBILITY_PRESET hidden)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON)
set(CMAKE_C_STANDARD 90)
set(CMAKE_C_STANDARD 11)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down Expand Up @@ -81,15 +81,20 @@ if(TSAN)
endif()

if(UBSAN)
cmake_minimum_required(VERSION 3.13)
list(APPEND uv_defines __UBSAN__=1)
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|GNU|Clang")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-omit-frame-pointer -fsanitize=undefined")
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fno-omit-frame-pointer -fsanitize=undefined")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fno-omit-frame-pointer -fsanitize=undefined")
elseif(MSVC)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fsanitize=undefined")
add_compile_options("-fsanitize=undefined" "-fno-sanitize-recover=undefined")
if (NOT WIN32)
add_link_options("-fsanitize=undefined")
endif()
if(MSVC)
add_compile_options("/Oy-")
else()
add_compile_options("-fno-omit-frame-pointer")
endif()
else()
message(SEND_ERROR "UndefinedBehaviorSanitizer support requires clang, gcc, or msvc. Try again with -DCMAKE_C_COMPILER.")
message(SEND_ERROR "UndefinedBehaviorSanitizer support requires clang or gcc. Try again with -DCMAKE_C_COMPILER.")
endif()
endif()

Expand Down Expand Up @@ -161,6 +166,11 @@ list(APPEND uv_cflags ${lint-utf8-msvc} )
check_c_compiler_flag(-fno-strict-aliasing UV_F_STRICT_ALIASING)
list(APPEND uv_cflags $<$<BOOL:${UV_F_STRICT_ALIASING}>:-fno-strict-aliasing>)

if (MSVC)
# Error on calling undeclared functions.
list(APPEND uv_cflags "/we4013")
endif()

set(uv_sources
src/fs-poll.c
src/idna.c
Expand All @@ -176,7 +186,7 @@ set(uv_sources
src/version.c)

if(WIN32)
list(APPEND uv_defines WIN32_LEAN_AND_MEAN _WIN32_WINNT=0x0602)
list(APPEND uv_defines WIN32_LEAN_AND_MEAN _WIN32_WINNT=0x0A00 _CRT_DECLARE_NONSTDC_NAMES=0)
list(APPEND uv_libraries
psapi
user32
Expand All @@ -186,7 +196,7 @@ if(WIN32)
ws2_32
dbghelp
ole32
uuid)
shell32)
list(APPEND uv_sources
src/win/async.c
src/win/core.c
Expand Down Expand Up @@ -302,6 +312,7 @@ if(APPLE)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "GNU")
list(APPEND uv_defines _GNU_SOURCE _POSIX_C_SOURCE=200112 _XOPEN_SOURCE=500)
list(APPEND uv_libraries dl)
list(APPEND uv_sources
src/unix/bsd-ifaddrs.c
Expand Down Expand Up @@ -423,6 +434,7 @@ endif()

if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|Linux|NetBSD|OpenBSD")
list(APPEND uv_test_libraries util)
list(APPEND uv_libraries m)
endif()

if(CYGWIN OR MSYS)
Expand Down Expand Up @@ -477,7 +489,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "OS390")
endif()
target_link_libraries(uv_a ${uv_libraries})
set_target_properties(uv_a PROPERTIES OUTPUT_NAME "uv")
if(MSVC)
if(WIN32)
set_target_properties(uv_a PROPERTIES PREFIX "lib")
endif()

Expand Down Expand Up @@ -561,6 +573,7 @@ if(LIBUV_BUILD_TESTS)
test/test-hrtime.c
test/test-idle.c
test/test-idna.c
test/test-iouring-pollhup.c
test/test-ip4-addr.c
test/test-ip6-addr.c
test/test-ip-name.c
Expand All @@ -571,6 +584,7 @@ if(LIBUV_BUILD_TESTS)
test/test-loop-close.c
test/test-loop-configure.c
test/test-loop-handles.c
test/test-loop-oom.c
test/test-loop-stop.c
test/test-loop-time.c
test/test-metrics.c
Expand Down Expand Up @@ -638,6 +652,7 @@ if(LIBUV_BUILD_TESTS)
test/test-tcp-oob.c
test/test-tcp-open.c
test/test-tcp-read-stop.c
test/test-tcp-reuseport.c
test/test-tcp-read-stop-start.c
test/test-tcp-rst.c
test/test-tcp-shutdown-after-write.c
Expand All @@ -654,6 +669,8 @@ if(LIBUV_BUILD_TESTS)
test/test-thread-affinity.c
test/test-thread-equal.c
test/test-thread.c
test/test-thread-name.c
test/test-thread-priority.c
test/test-threadpool-cancel.c
test/test-threadpool.c
test/test-timer-again.c
Expand Down Expand Up @@ -685,6 +702,7 @@ if(LIBUV_BUILD_TESTS)
test/test-udp-send-unreachable.c
test/test-udp-try-send.c
test/test-udp-recv-in-a-row.c
test/test-udp-reuseport.c
test/test-uname.c
test/test-walk-handles.c
test/test-watcher-cross-stop.c)
Expand All @@ -701,6 +719,12 @@ if(LIBUV_BUILD_TESTS)
set_tests_properties(uv_test PROPERTIES ENVIRONMENT
"LIBPATH=${CMAKE_BINARY_DIR}:$ENV{LIBPATH}")
endif()
if(WIN32)
add_custom_command(TARGET uv_run_tests POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy
"$<TARGET_FILE:uv_run_tests>"
"$<TARGET_FILE_DIR:uv_run_tests>/uv_run_tests_no_ext")
endif()
add_executable(uv_run_tests_a ${uv_test_sources} uv_win_longpath.manifest)
target_compile_definitions(uv_run_tests_a PRIVATE ${uv_defines})
target_compile_options(uv_run_tests_a PRIVATE ${uv_cflags})
Expand All @@ -717,6 +741,12 @@ if(LIBUV_BUILD_TESTS)
set_target_properties(uv_run_tests PROPERTIES LINKER_LANGUAGE CXX)
set_target_properties(uv_run_tests_a PROPERTIES LINKER_LANGUAGE CXX)
endif()
if(WIN32)
add_custom_command(TARGET uv_run_tests_a POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy
"$<TARGET_FILE:uv_run_tests_a>"
"$<TARGET_FILE_DIR:uv_run_tests_a>/uv_run_tests_a_no_ext")
endif()
endif()

# Now for some gibbering horrors from beyond the stars...
Expand Down Expand Up @@ -761,8 +791,22 @@ endif()

if(MSVC)
set(CMAKE_DEBUG_POSTFIX d)
get_filename_component(CMAKE_C_COMPILER_DIR ${CMAKE_C_COMPILER} DIRECTORY)
if(ASAN)
file(INSTALL "${CMAKE_C_COMPILER_DIR}/llvm-symbolizer.exe" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
file(INSTALL "${CMAKE_C_COMPILER_DIR}/clang_rt.asan_dynamic-x86_64.dll" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
file(INSTALL "${CMAKE_C_COMPILER_DIR}/clang_rt.asan_dbg_dynamic-x86_64.dll" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
endif()
endif()

if(BUILD_SHARED_LIBS)
set(LIB_SELECTED uv)
else()
set(LIB_SELECTED uv_a)
endif()

add_library(libuv::libuv ALIAS ${LIB_SELECTED})

message(STATUS "summary of build options:
Install prefix: ${CMAKE_INSTALL_PREFIX}
Target system: ${CMAKE_SYSTEM_NAME}
Expand Down
Loading
Loading