Skip to content

Commit 6826ef0

Browse files
cjihrigBethGriggs
authored andcommittedMar 2, 2020
deps: upgrade to libuv 1.33.1
Notable changes: - uv_random() has been added. - More work to read those pesky Windows environment variables. - Several build fixes for Tier 3 platforms (Android, NetBSD, OpenBSD, Haiku). - Stop using fsevents to watch files (using kqueue again). PR-URL: #29996 Backport-PR-URL: #31969 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
1 parent aed7ca4 commit 6826ef0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1276
-228
lines changed
 

Diff for: ‎deps/uv/AUTHORS

+8
Original file line numberDiff line numberDiff line change
@@ -403,3 +403,11 @@ Vladimir Karnushin <v.karnushin@mail.ru>
403403
MaYuming <maym@appexnetworks.com>
404404
Eneas U de Queiroz <cotequeiroz@gmail.com>
405405
Daniel Hahler <git@thequod.de>
406+
Yang Yu <yang.yu@disigma.org>
407+
David Carlier <devnexen@gmail.com>
408+
Calvin Hill <calvin@hakobaito.co.uk>
409+
Isabella Muerte <63051+slurps-mad-rips@users.noreply.github.com>
410+
Ouyang Yadong <oyydoibh@gmail.com>
411+
ZYSzys <zyszys98@gmail.com>
412+
Carl Lei <xecycle@gmail.com>
413+
Stefan Bender <stefan.bender@ntnu.no>

Diff for: ‎deps/uv/CMakeLists.txt

+33-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# TODO: determine CMAKE_SYSTEM_NAME on OS/390. Currently assumes "OS/390".
2-
cmake_minimum_required(VERSION 2.8.12)
3-
project(libuv)
2+
cmake_minimum_required(VERSION 3.4)
3+
project(libuv LANGUAGES C)
4+
5+
include(CMakePackageConfigHelpers)
6+
include(CMakeDependentOption)
7+
include(GNUInstallDirs)
8+
include(CTest)
9+
10+
cmake_dependent_option(LIBUV_BUILD_TESTS
11+
"Build the unit tests when BUILD_TESTING is enabled and we are the root project" ON
12+
"BUILD_TESTING;CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF)
413

514
if(MSVC)
615
list(APPEND uv_cflags /W4)
@@ -14,6 +23,7 @@ set(uv_sources
1423
src/fs-poll.c
1524
src/idna.c
1625
src/inet.c
26+
src/random.c
1727
src/strscpy.c
1828
src/threadpool.c
1929
src/timer.c
@@ -72,7 +82,6 @@ set(uv_test_sources
7282
test/test-idna.c
7383
test/test-ip4-addr.c
7484
test/test-ip6-addr.c
75-
test/test-ip6-addr.c
7685
test/test-ipc-heavy-traffic-deadlock-bug.c
7786
test/test-ipc-send-recv.c
7887
test/test-ipc.c
@@ -108,6 +117,7 @@ set(uv_test_sources
108117
test/test-process-title-threadsafe.c
109118
test/test-process-title.c
110119
test/test-queue-foreach-delete.c
120+
test/test-random.c
111121
test/test-ref.c
112122
test/test-run-nowait.c
113123
test/test-run-once.c
@@ -236,6 +246,7 @@ else()
236246
src/unix/pipe.c
237247
src/unix/poll.c
238248
src/unix/process.c
249+
src/unix/random-devurandom.c
239250
src/unix/signal.c
240251
src/unix/stream.c
241252
src/unix/tcp.c
@@ -284,6 +295,14 @@ if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|NetBSD|OpenBSD")
284295
list(APPEND uv_sources src/unix/bsd-ifaddrs.c src/unix/kqueue.c)
285296
endif()
286297

298+
if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
299+
list(APPEND uv_sources src/unix/random-getrandom.c)
300+
endif()
301+
302+
if(APPLE OR CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
303+
list(APPEND uv_sources src/unix/random-getentropy.c)
304+
endif()
305+
287306
if(APPLE)
288307
list(APPEND uv_defines _DARWIN_UNLIMITED_SELECT=1 _DARWIN_USE_64_BIT_INODE=1)
289308
list(APPEND uv_sources
@@ -300,6 +319,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
300319
src/unix/linux-inotify.c
301320
src/unix/linux-syscalls.c
302321
src/unix/procfs-exepath.c
322+
src/unix/random-getrandom.c
323+
src/unix/random-sysctl.c
303324
src/unix/sysinfo-loadavg.c)
304325
endif()
305326

@@ -356,11 +377,7 @@ target_compile_options(uv_a PRIVATE ${uv_cflags})
356377
target_include_directories(uv_a PUBLIC include PRIVATE src)
357378
target_link_libraries(uv_a ${uv_libraries})
358379

359-
option(libuv_buildtests "Build the unit tests when BUILD_TESTING is enabled." ON)
360-
361-
include(CTest)
362-
if(BUILD_TESTING AND libuv_buildtests)
363-
enable_testing()
380+
if(LIBUV_BUILD_TESTS)
364381
add_executable(uv_run_tests ${uv_test_sources})
365382
target_compile_definitions(uv_run_tests
366383
PRIVATE ${uv_defines} USING_UV_SHARED=1)
@@ -380,7 +397,6 @@ endif()
380397

381398
if(UNIX)
382399
# Now for some gibbering horrors from beyond the stars...
383-
include(GNUInstallDirs)
384400
foreach(x ${uv_libraries})
385401
set(LIBS "${LIBS} -l${x}")
386402
endforeach(x)
@@ -402,3 +418,11 @@ if(UNIX)
402418
install(TARGETS uv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
403419
install(TARGETS uv_a ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
404420
endif()
421+
422+
if(WIN32)
423+
install(DIRECTORY include/ DESTINATION include)
424+
install(FILES LICENSE DESTINATION .)
425+
install(TARGETS uv uv_a
426+
RUNTIME DESTINATION lib/$<CONFIG>
427+
ARCHIVE DESTINATION lib/$<CONFIG>)
428+
endif()

0 commit comments

Comments
 (0)
Please sign in to comment.