diff --git a/.gitignore b/.gitignore
index b6abc2ab..83370a7b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,11 +37,6 @@ vgcore.*
Makefile
Makefile.in
-# Generated by gyp for android
-*.target.mk
-/android-toolchain
-
-/out/
/build/
/test/.libs/
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 6f8c45af..b0abe3b4 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -142,7 +142,6 @@ Bug fixes and features should come with tests. Add your tests in the
If you add a new test file, it needs to be registered in three places:
- `CMakeLists.txt`: add the file's name to the `uv_test_sources` list.
- `Makefile.am`: add the file's name to the `test_run_tests_SOURCES` list.
-- `uv.gyp`: add the file's name to the `sources` list in the `run-tests` target.
Look at other tests to see how they should be structured (license boilerplate,
the way entry points are declared, etc.).
diff --git a/Makefile.am b/Makefile.am
index 9045f363..23fa19dc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -123,17 +123,9 @@ EXTRA_DIST = test/fixtures/empty_file \
include \
docs \
img \
- android-configure-arm \
- android-configure-arm64 \
- android-configure-x86 \
- android-configure-x86_64 \
CONTRIBUTING.md \
LICENSE \
- README.md \
- vcbuild.bat \
- common.gypi \
- gyp_uv.py \
- uv.gyp
+ README.md
diff --git a/README.md b/README.md
index 9c785da8..30b9a9cd 100644
--- a/README.md
+++ b/README.md
@@ -152,47 +152,14 @@ $ gpg --verify libuv-1.7.0.tar.gz.sign
## Build Instructions
-For GCC there are two build methods: via autotools or via [GYP][].
-GYP is a meta-build system which can generate MSVS, Makefile, and XCode
-backends. It is best used for integration into other projects.
+For UNIX-like platforms, including macOS, there are two build methods:
+autotools or [CMake][].
-To build with autotools:
+For Windows, [CMake][] is the only supported build method and has the
+following prerequisites:
-```bash
-$ sh autogen.sh
-$ ./configure
-$ make
-$ make check
-$ make install
-```
+
-To build with [CMake](https://cmake.org/):
-
-```bash
-$ mkdir -p out/cmake ; cd out/cmake # create build directory
-$ cmake ../.. -DBUILD_TESTING=ON # generate project with test
-$ cmake --build . # build
-$ ctest -C Debug --output-on-failure # run tests
-
-# Or manually run tests:
-$ ./out/cmake/uv_run_tests # shared library build
-$ ./out/cmake/uv_run_tests_a # static library build
-```
-
-To build with GYP, first run:
-
-```bash
-$ git clone https://chromium.googlesource.com/external/gyp build/gyp
-```
-
-### Windows
-
-Prerequisites:
-
-* [Python 2.6 or 2.7][] as it is required
- by [GYP][].
- If python is not in your path, set the environment variable `PYTHON` to its
- location. For example: `set PYTHON=C:\Python27\python.exe`
* One of:
* [Visual C++ Build Tools][]
* [Visual Studio 2015 Update 3][], all editions
@@ -205,67 +172,35 @@ Prerequisites:
[Git for Windows][] includes Git Bash
and tools which can be included in the global `PATH`.
-To build, launch a git shell (e.g. Cmd or PowerShell), run `vcbuild.bat`
-(to build with VS2017 you need to explicitly add a `vs2017` argument),
-which will checkout the GYP code into `build/gyp`, generate `uv.sln`
-as well as the necesery related project files, and start building.
+
-```console
-> vcbuild
-```
-
-Or:
-
-```console
-> vcbuild vs2017
-```
-
-To run the tests:
-
-```console
-> vcbuild test
-```
-
-To see all the options that could passed to `vcbuild`:
-
-```console
-> vcbuild help
-vcbuild.bat [debug/release] [test/bench] [clean] [noprojgen] [nobuild] [vs2017] [x86/x64] [static/shared]
-Examples:
- vcbuild.bat : builds debug build
- vcbuild.bat test : builds debug build and runs tests
- vcbuild.bat release bench: builds release build and runs benchmarks
-```
-
-
-### Unix
-
-For Debug builds (recommended) run:
+To build with autotools:
```bash
-$ ./gyp_uv.py -f make
-$ make -C out
+$ sh autogen.sh
+$ ./configure
+$ make
+$ make check
+$ make install
```
-For Release builds run:
+To build with [CMake][]:
```bash
-$ ./gyp_uv.py -f make
-$ BUILDTYPE=Release make -C out
+$ mkdir -p build
+
+$ (cd build && cmake .. -DBUILD_TESTING=ON) # generate project with tests
+$ cmake --build build # add `-j ` with cmake >= 3.12
+
+# Run tests:
+$ (cd build && ctest -C Debug --output-on-failure)
+
+# Or manually run tests:
+$ build/uv_run_tests # shared library build
+$ build/uv_run_tests_a # static library build
```
-Run `./gyp_uv.py -f make -Dtarget_arch=x32` to build [x32][] binaries.
-
-### OS X
-
-Run:
-
-```bash
-$ ./gyp_uv.py -f xcode
-$ xcodebuild -ARCHS="x86_64" -project out/uv.xcodeproj -configuration Release -alltargets
-```
-
-Using Homebrew:
+### Install with Homebrew
```bash
$ brew install --HEAD libuv
@@ -277,110 +212,48 @@ Make sure that you specify the architecture you wish to build for in the
"ARCHS" flag. You can specify more than one by delimiting with a space
(e.g. "x86_64 i386").
-### Android
-
-Run:
-
-For arm
-
-```bash
-$ source ./android-configure-arm NDK_PATH gyp [API_LEVEL]
-$ make -C out
-```
-
-or for arm64
-
-```bash
-$ source ./android-configure-arm64 NDK_PATH gyp [API_LEVEL]
-$ make -C out
-```
-
-or for x86
-
-```bash
-$ source ./android-configure-x86 NDK_PATH gyp [API_LEVEL]
-$ make -C out
-```
-
-or for x86_64
-
-```bash
-$ source ./android-configure-x86_64 NDK_PATH gyp [API_LEVEL]
-$ make -C out
-```
-
-The default API level is 24, but a different one can be selected as follows:
-
-```bash
-$ source ./android-configure-arm ~/android-ndk-r15b gyp 21
-$ make -C out
-```
-
-Note for UNIX users: compile your project with `-D_LARGEFILE_SOURCE` and
-`-D_FILE_OFFSET_BITS=64`. GYP builds take care of that automatically.
-
-### Using Ninja
-
-To use ninja for build on ninja supported platforms, run:
-
-```bash
-$ ./gyp_uv.py -f ninja
-$ ninja -C out/Debug #for debug build OR
-$ ninja -C out/Release
-```
-
-
### Running tests
-#### Build
-
-Build (includes tests):
-
-```bash
-$ ./gyp_uv.py -f make
-$ make -C out
-```
-
-#### Run all tests
-
-```bash
-$ ./out/Debug/run-tests
-```
-
Some tests are timing sensitive. Relaxing test timeouts may be necessary
on slow or overloaded machines:
```bash
-$ env UV_TEST_TIMEOUT_MULTIPLIER=2 ./out/Debug/run-tests # 10s instead of 5s
+$ env UV_TEST_TIMEOUT_MULTIPLIER=2 build/uv_run_tests # 10s instead of 5s
```
#### Run one test
The list of all tests is in `test/test-list.h`.
-This invocation will cause the `run-tests` driver to fork and execute `TEST_NAME` in a child process:
+This invocation will cause the test driver to fork and execute `TEST_NAME` in
+a child process:
```bash
-$ ./out/Debug/run-tests TEST_NAME
+$ build/uv_run_tests_a TEST_NAME
```
-This invocation will cause the `run-tests` driver to execute the test within the `run-tests` process:
+This invocation will cause the test driver to execute the test in
+the same process:
```bash
-$ ./out/Debug/run-tests TEST_NAME TEST_NAME
+$ build/uv_run_tests_a TEST_NAME TEST_NAME
```
#### Debugging tools
-When running the test from within the `run-tests` process (`run-tests TEST_NAME TEST_NAME`), tools like gdb and valgrind work normally.
-When running the test from a child of the `run-tests` process (`run-tests TEST_NAME`), use these tools in a fork-aware manner.
+When running the test from within the test driver process
+(`build/uv_run_tests_a TEST_NAME TEST_NAME`), tools like gdb and valgrind
+work normally.
+
+When running the test from a child of the test driver process
+(`build/uv_run_tests_a TEST_NAME`), use these tools in a fork-aware manner.
##### Fork-aware gdb
Use the [follow-fork-mode](https://sourceware.org/gdb/onlinedocs/gdb/Forks.html) setting:
```
-$ gdb --args out/Debug/run-tests TEST_NAME
+$ gdb --args build/uv_run_tests_a TEST_NAME
(gdb) set follow-fork-mode child
...
@@ -391,13 +264,14 @@ $ gdb --args out/Debug/run-tests TEST_NAME
Use the `--trace-children=yes` parameter:
```bash
-$ valgrind --trace-children=yes -v --tool=memcheck --leak-check=full --track-origins=yes --leak-resolution=high --show-reachable=yes --log-file=memcheck-%p.log out/Debug/run-tests TEST_NAME
+$ valgrind --trace-children=yes -v --tool=memcheck --leak-check=full --track-origins=yes --leak-resolution=high --show-reachable=yes --log-file=memcheck-%p.log build/uv_run_tests_a TEST_NAME
```
### Running benchmarks
See the section on running tests.
-The benchmark driver is `out/Debug/run-benchmarks` and the benchmarks are listed in `test/benchmark-list.h`.
+The benchmark driver is `./uv_run_benchmarks_a` and the benchmarks are
+listed in `test/benchmark-list.h`.
## Supported Platforms
@@ -413,8 +287,6 @@ that is detected by `autoconf`.
[IBM documentation](http://www.ibm.com/developerworks/aix/library/au-aix_event_infrastructure/)
describes the package in more detail.
-AIX support for filesystem events is not compiled when building with `gyp`.
-
### z/OS Notes
z/OS creates System V semaphores and message queues. These persist on the system
@@ -426,12 +298,10 @@ Use the `ipcrm` command to manually clear up System V resources.
See the [guidelines for contributing][].
+[CMake]: https://cmake.org/
[node.js]: http://nodejs.org/
-[GYP]: http://code.google.com/p/gyp/
[guidelines for contributing]: https://github.com/libuv/libuv/blob/master/CONTRIBUTING.md
[libuv_banner]: https://raw.githubusercontent.com/libuv/libuv/master/img/banner.png
-[x32]: https://en.wikipedia.org/wiki/X32_ABI
-[Python 2.6 or 2.7]: https://www.python.org/downloads/
[Visual C++ Build Tools]: https://visualstudio.microsoft.com/visual-cpp-build-tools/
[Visual Studio 2015 Update 3]: https://www.visualstudio.com/vs/older-downloads/
[Visual Studio 2017]: https://www.visualstudio.com/downloads/
diff --git a/SUPPORTED_PLATFORMS.md b/SUPPORTED_PLATFORMS.md
index 29e4844f..72e054eb 100644
--- a/SUPPORTED_PLATFORMS.md
+++ b/SUPPORTED_PLATFORMS.md
@@ -47,8 +47,9 @@ All functionality related to the new platform must be implemented in its own
file inside ``src/unix/`` unless it's already done in a common file, in which
case adding an `ifdef` is fine.
-Two build systems are supported: autotools and GYP. Ideally both need to be
-supported, but if GYP does not support the new platform it can be left out.
+Two build systems are supported: autotools and cmake. Ideally both need to be
+supported, but if one of the two does not support the new platform it can be
+left out.
### Windows
diff --git a/android-configure-arm b/android-configure-arm
deleted file mode 100755
index 331fdd9e..00000000
--- a/android-configure-arm
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-
-export TOOLCHAIN=$PWD/android-toolchain-arm
-mkdir -p $TOOLCHAIN
-API=${3:-24}
-$1/build/tools/make-standalone-toolchain.sh \
- --toolchain=arm-linux-androideabi-4.9 \
- --arch=arm \
- --install-dir=$TOOLCHAIN \
- --platform=android-$API \
- --force
-export PATH=$TOOLCHAIN/bin:$PATH
-export AR=arm-linux-androideabi-ar
-export CC=arm-linux-androideabi-gcc
-export CXX=arm-linux-androideabi-g++
-export LINK=arm-linux-androideabi-g++
-export PLATFORM=android
-export CFLAGS="-D__ANDROID_API__=$API"
-
-if [[ $2 == 'gyp' ]]
- then
- ./gyp_uv.py -Dtarget_arch=arm -DOS=android -f make-android
-fi
diff --git a/android-configure-arm64 b/android-configure-arm64
deleted file mode 100755
index 1acd905d..00000000
--- a/android-configure-arm64
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-
-export TOOLCHAIN=$PWD/android-toolchain-arm64
-mkdir -p $TOOLCHAIN
-API=${3:-24}
-$1/build/tools/make-standalone-toolchain.sh \
- --toolchain=aarch64-linux-android-4.9 \
- --arch=arm64 \
- --install-dir=$TOOLCHAIN \
- --platform=android-$API \
- --force
-export PATH=$TOOLCHAIN/bin:$PATH
-export AR=aarch64-linux-android-ar
-export CC=aarch64-linux-android-gcc
-export CXX=aarch64-linux-android-g++
-export LINK=aarch64-linux-android-g++
-export PLATFORM=android
-export CFLAGS="-D__ANDROID_API__=$API"
-
-if [[ $2 == 'gyp' ]]
- then
- ./gyp_uv.py -Dtarget_arch=arm64 -DOS=android -f make-android
-fi
diff --git a/android-configure-x86 b/android-configure-x86
deleted file mode 100755
index a149715f..00000000
--- a/android-configure-x86
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-
-export TOOLCHAIN=$PWD/android-toolchain-x86
-mkdir -p $TOOLCHAIN
-API=${3:-24}
-$1/build/tools/make-standalone-toolchain.sh \
- --toolchain=x86-4.9 \
- --arch=x86 \
- --install-dir=$TOOLCHAIN \
- --platform=android-$API \
- --force
-export PATH=$TOOLCHAIN/bin:$PATH
-export AR=i686-linux-android-ar
-export CC=i686-linux-android-gcc
-export CXX=i686-linux-android-g++
-export LINK=i686-linux-android-g++
-export PLATFORM=android
-export CFLAGS="-D__ANDROID_API__=$API"
-
-if [[ $2 == 'gyp' ]]
- then
- ./gyp_uv.py -Dtarget_arch=x86 -DOS=android -f make-android
-fi
diff --git a/android-configure-x86_64 b/android-configure-x86_64
deleted file mode 100755
index ff045957..00000000
--- a/android-configure-x86_64
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-export TOOLCHAIN=$PWD/android-toolchain-x86_64
-mkdir -p $TOOLCHAIN
-API=${3:-24}
-$1/build/tools/make-standalone-toolchain.sh \
- --toolchain=x86_64-4.9 \
- --arch=x86_64 \
- --install-dir=$TOOLCHAIN \
- --platform=android-$API \
- --force
-export PATH=$TOOLCHAIN/bin:$PATH
-export AR=x86_64-linux-android-ar
-export CC=x86_64-linux-android-gcc
-export CXX=x86_64-linux-android-g++
-export LINK=x86_64-linux-android-g++
-export PLATFORM=android
-export CFLAGS="-D__ANDROID_API__=$API -fPIC"
-export CXXFLAGS="-D__ANDROID_API__=$API -fPIC"
-export LDFLAGS="-fPIC"
-
-if [[ $2 == 'gyp' ]]
- then
- ./gyp_uv.py -Dtarget_arch=x86_64 -DOS=android -f make-android
-fi
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100644
index 1b018a59..00000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-version: v1.18.0.build{build}
-
-init:
- - git config --global core.autocrlf true
-
-install:
- - cinst -y nsis
-
-matrix:
- fast_finish: true
- allow_failures:
- - platform: x86
- configuration: Release
- - platform: x64
- configuration: Release
-
-platform:
- - x86
- - x64
-
-configuration:
- - Release
-
-build_script:
- # Fixed tag version number if using a tag.
- - cmd: if "%APPVEYOR_REPO_TAG%" == "true" set APPVEYOR_BUILD_VERSION=%APPVEYOR_REPO_TAG_NAME%
- # vcbuild overwrites the platform variable.
- - cmd: set ARCH=%platform%
- - cmd: vcbuild.bat release %ARCH% shared
-
-cache:
- - C:\projects\libuv\build\gyp
diff --git a/common.gypi b/common.gypi
deleted file mode 100644
index 8e2aa716..00000000
--- a/common.gypi
+++ /dev/null
@@ -1,213 +0,0 @@
-{
- 'variables': {
- 'target_arch%': 'ia32', # set v8's target architecture
- 'host_arch%': 'ia32', # set v8's host architecture
- 'uv_library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
- 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
- },
-
- 'target_defaults': {
- 'default_configuration': 'Debug',
- 'configurations': {
- 'Debug': {
- 'defines': [ 'DEBUG', '_DEBUG' ],
- 'cflags': [ '-g' ],
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'target_conditions': [
- ['uv_library=="static_library"', {
- 'RuntimeLibrary': 1, # /MTd static debug
- }, {
- 'RuntimeLibrary': 3, # /MDd DLL debug
- }],
- ],
- 'Optimization': 0, # /Od, no optimization
- 'MinimalRebuild': 'false',
- 'OmitFramePointers': 'false',
- 'BasicRuntimeChecks': 3, # /RTC1
- },
- 'VCLinkerTool': {
- 'LinkIncremental': 2, # enable incremental linking
- },
- },
- 'xcode_settings': {
- 'GCC_OPTIMIZATION_LEVEL': '0',
- },
- 'conditions': [
- ['OS != "zos"', {
- 'cflags': [ '-O0', '-fno-common', '-fwrapv' ]
- }],
- ['OS == "android"', {
- 'cflags': [ '-fPIE' ],
- 'ldflags': [ '-fPIE', '-pie' ]
- }]
- ]
- },
- 'Release': {
- 'defines': [ 'NDEBUG' ],
- 'cflags': [
- '-O3',
- ],
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'target_conditions': [
- ['uv_library=="static_library"', {
- 'RuntimeLibrary': 0, # /MT static release
- }, {
- 'RuntimeLibrary': 2, # /MD DLL release
- }],
- ],
- 'Optimization': 3, # /Ox, full optimization
- 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
- 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
- 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
- 'OmitFramePointers': 'true',
- 'EnableFunctionLevelLinking': 'true',
- 'EnableIntrinsicFunctions': 'true',
- },
- 'VCLibrarianTool': {
- 'AdditionalOptions': [
- '/LTCG', # link time code generation
- ],
- },
- 'VCLinkerTool': {
- 'LinkTimeCodeGeneration': 1, # link-time code generation
- 'OptimizeReferences': 2, # /OPT:REF
- 'EnableCOMDATFolding': 2, # /OPT:ICF
- 'LinkIncremental': 1, # disable incremental linking
- },
- },
- 'conditions': [
- ['OS != "zos"', {
- 'cflags': [
- '-fdata-sections',
- '-ffunction-sections',
- '-fno-common',
- '-fomit-frame-pointer',
- ],
- }],
- ]
- }
- },
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'StringPooling': 'true', # pool string literals
- 'DebugInformationFormat': 3, # Generate a PDB
- 'WarningLevel': 3,
- 'BufferSecurityCheck': 'true',
- 'ExceptionHandling': 1, # /EHsc
- 'SuppressStartupBanner': 'true',
- 'WarnAsError': 'false',
- 'AdditionalOptions': [
- '/MP', # compile across multiple CPUs
- ],
- },
- 'VCLibrarianTool': {
- },
- 'VCLinkerTool': {
- 'GenerateDebugInformation': 'true',
- 'RandomizedBaseAddress': 2, # enable ASLR
- 'DataExecutionPrevention': 2, # enable DEP
- 'AllowIsolation': 'true',
- 'SuppressStartupBanner': 'true',
- 'target_conditions': [
- ['_type=="executable"', {
- 'SubSystem': 1, # console executable
- }],
- ],
- },
- },
- 'conditions': [
- ['OS == "win"', {
- 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
- 'defines': [
- 'WIN32',
- # we don't really want VC++ warning us about
- # how dangerous C functions are...
- '_CRT_SECURE_NO_DEPRECATE',
- # ... or that C implementations shouldn't use
- # POSIX names
- '_CRT_NONSTDC_NO_DEPRECATE',
- ],
- 'target_conditions': [
- ['target_arch=="x64"', {
- 'msvs_configuration_platform': 'x64'
- }]
- ]
- }],
- ['OS in "freebsd dragonflybsd linux openbsd solaris android aix"', {
- 'cflags': [ '-Wall' ],
- 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
- 'target_conditions': [
- ['_type=="static_library"', {
- 'standalone_static_library': 1, # disable thin archive which needs binutils >= 2.19
- }],
- ],
- 'conditions': [
- [ 'host_arch != target_arch and target_arch=="ia32"', {
- 'cflags': [ '-m32' ],
- 'ldflags': [ '-m32' ],
- }],
- [ 'target_arch=="x32"', {
- 'cflags': [ '-mx32' ],
- 'ldflags': [ '-mx32' ],
- }],
- [ 'OS=="linux"', {
- 'cflags': [ '-ansi' ],
- }],
- [ 'OS=="solaris"', {
- 'cflags': [ '-pthreads' ],
- 'ldflags': [ '-pthreads' ],
- }],
- [ 'OS not in "solaris android zos"', {
- 'cflags': [ '-pthread' ],
- 'ldflags': [ '-pthread' ],
- }],
- [ 'OS=="aix" and target_arch=="ppc64"', {
- 'cflags': [ '-maix64' ],
- 'ldflags': [ '-maix64' ],
- }],
- ],
- }],
- ['OS=="mac"', {
- 'xcode_settings': {
- 'ALWAYS_SEARCH_USER_PATHS': 'NO',
- 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
- 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
- # (Equivalent to -fPIC)
- 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
- 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
- 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
- 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
- 'PREBINDING': 'NO', # No -Wl,-prebind
- 'USE_HEADERMAP': 'NO',
- 'WARNING_CFLAGS': [
- '-Wall',
- '-Wendif-labels',
- '-W',
- '-Wno-unused-parameter',
- '-Wstrict-prototypes',
- ],
- },
- 'conditions': [
- ['target_arch=="ia32"', {
- 'xcode_settings': {'ARCHS': ['i386']},
- }],
- ['target_arch=="x64"', {
- 'xcode_settings': {'ARCHS': ['x86_64']},
- }],
- ],
- 'target_conditions': [
- ['_type!="static_library"', {
- 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
- }],
- ],
- }],
- ['OS=="solaris"', {
- 'cflags': [ '-fno-omit-frame-pointer' ],
- # pull in V8's postmortem metadata
- 'ldflags': [ '-Wl,-z,allextract' ]
- }],
- ],
- },
-}
diff --git a/gyp_uv.py b/gyp_uv.py
deleted file mode 100755
index c2add5ca..00000000
--- a/gyp_uv.py
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import platform
-import sys
-
-try:
- import multiprocessing.synchronize
- gyp_parallel_support = True
-except ImportError:
- gyp_parallel_support = False
-
-
-CC = os.environ.get('CC', 'cc')
-script_dir = os.path.dirname(__file__)
-uv_root = os.path.normpath(script_dir)
-output_dir = os.path.join(os.path.abspath(uv_root), 'out')
-
-sys.path.insert(0, os.path.join(uv_root, 'build', 'gyp', 'pylib'))
-try:
- import gyp
-except ImportError:
- print('You need to install gyp in build/gyp first. See the README.')
- sys.exit(42)
-
-
-def host_arch():
- machine = platform.machine()
- if machine == 'i386': return 'ia32'
- if machine == 'AMD64': return 'x64'
- if machine == 'x86_64': return 'x64'
- if machine.startswith('arm'): return 'arm'
- if machine.startswith('mips'): return 'mips'
- return machine # Return as-is and hope for the best.
-
-
-def run_gyp(args):
- rc = gyp.main(args)
- if rc != 0:
- print('Error running GYP')
- sys.exit(rc)
-
-
-if __name__ == '__main__':
- args = sys.argv[1:]
- args.extend('-I common.gypi test/test.gyp'.split(' '))
- args.append('--depth=' + uv_root)
-
- # There's a bug with windows which doesn't allow this feature.
- if sys.platform != 'win32':
- if '-f' not in args:
- args.extend('-f make'.split())
- if 'eclipse' not in args and 'ninja' not in args:
- args.extend(['-Goutput_dir=' + output_dir])
- args.extend(['--generator-output', output_dir])
-
- if not any(a.startswith('-Dhost_arch=') for a in args):
- args.append('-Dhost_arch=%s' % host_arch())
-
- if not any(a.startswith('-Dtarget_arch=') for a in args):
- args.append('-Dtarget_arch=%s' % host_arch())
-
- if not any(a.startswith('-Duv_library=') for a in args):
- args.append('-Duv_library=static_library')
-
- # Some platforms (OpenBSD for example) don't have multiprocessing.synchronize
- # so gyp must be run with --no-parallel
- if not gyp_parallel_support:
- args.append('--no-parallel')
-
- gyp_args = list(args)
- print(gyp_args)
- run_gyp(gyp_args)
diff --git a/include/uv/version.h b/include/uv/version.h
index 1536a35c..4197bd73 100644
--- a/include/uv/version.h
+++ b/include/uv/version.h
@@ -26,7 +26,7 @@
* Versions with the same major number are ABI stable. API is allowed to
* evolve between minor releases, but only in a backwards compatible way.
* Make sure you update the -soname directives in configure.ac
- * and uv.gyp whenever you bump UV_VERSION_MAJOR or UV_VERSION_MINOR (but
+ * whenever you bump UV_VERSION_MAJOR or UV_VERSION_MINOR (but
* not UV_VERSION_PATCH.)
*/
diff --git a/test/test.gyp b/test/test.gyp
deleted file mode 100644
index 48fc5eaf..00000000
--- a/test/test.gyp
+++ /dev/null
@@ -1,295 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'run-tests',
- 'type': 'executable',
- 'dependencies': [ '../uv.gyp:libuv' ],
- 'sources': [
- 'blackhole-server.c',
- 'echo-server.c',
- 'run-tests.c',
- 'runner.c',
- 'runner.h',
- 'test-get-loadavg.c',
- 'task.h',
- 'test-active.c',
- 'test-async.c',
- 'test-async-null-cb.c',
- 'test-callback-stack.c',
- 'test-callback-order.c',
- 'test-close-fd.c',
- 'test-close-order.c',
- 'test-connect-unspecified.c',
- 'test-connection-fail.c',
- 'test-cwd-and-chdir.c',
- 'test-default-loop-close.c',
- 'test-delayed-accept.c',
- 'test-eintr-handling.c',
- 'test-error.c',
- 'test-embed.c',
- 'test-emfile.c',
- 'test-env-vars.c',
- 'test-fail-always.c',
- 'test-fork.c',
- 'test-fs.c',
- 'test-fs-readdir.c',
- 'test-fs-copyfile.c',
- 'test-fs-event.c',
- 'test-fs-fd-hash.c',
- 'test-fs-open-flags.c',
- 'test-fs-poll.c',
- 'test-getters-setters.c',
- 'test-get-currentexe.c',
- 'test-get-memory.c',
- 'test-get-passwd.c',
- 'test-getaddrinfo.c',
- 'test-gethostname.c',
- 'test-getnameinfo.c',
- 'test-getsockname.c',
- 'test-gettimeofday.c',
- 'test-handle-fileno.c',
- 'test-homedir.c',
- 'test-hrtime.c',
- 'test-idle.c',
- 'test-idna.c',
- 'test-ip4-addr.c',
- 'test-ip6-addr.c',
- 'test-ipc-heavy-traffic-deadlock-bug.c',
- 'test-ipc-send-recv.c',
- 'test-ipc.c',
- 'test-list.h',
- 'test-loop-handles.c',
- 'test-loop-alive.c',
- 'test-loop-close.c',
- 'test-loop-stop.c',
- 'test-loop-time.c',
- 'test-loop-configure.c',
- 'test-walk-handles.c',
- 'test-watcher-cross-stop.c',
- 'test-multiple-listen.c',
- 'test-osx-select.c',
- 'test-pass-always.c',
- 'test-ping-pong.c',
- 'test-pipe-bind-error.c',
- 'test-pipe-connect-error.c',
- 'test-pipe-connect-multiple.c',
- 'test-pipe-connect-prepare.c',
- 'test-pipe-getsockname.c',
- 'test-pipe-pending-instances.c',
- 'test-pipe-sendmsg.c',
- 'test-pipe-server-close.c',
- 'test-pipe-close-stdout-read-stdin.c',
- 'test-pipe-set-non-blocking.c',
- 'test-pipe-set-fchmod.c',
- 'test-platform-output.c',
- 'test-poll.c',
- 'test-poll-close.c',
- 'test-poll-close-doesnt-corrupt-stack.c',
- 'test-poll-closesocket.c',
- 'test-poll-oob.c',
- 'test-process-priority.c',
- 'test-process-title.c',
- 'test-process-title-threadsafe.c',
- 'test-queue-foreach-delete.c',
- 'test-random.c',
- 'test-ref.c',
- 'test-run-nowait.c',
- 'test-run-once.c',
- 'test-semaphore.c',
- 'test-shutdown-close.c',
- 'test-shutdown-eof.c',
- 'test-shutdown-twice.c',
- 'test-signal.c',
- 'test-signal-multiple-loops.c',
- 'test-signal-pending-on-close.c',
- 'test-socket-buffer-size.c',
- 'test-spawn.c',
- 'test-strscpy.c',
- 'test-stdio-over-pipes.c',
- 'test-tcp-alloc-cb-fail.c',
- 'test-tcp-bind-error.c',
- 'test-tcp-bind6-error.c',
- 'test-tcp-close.c',
- 'test-tcp-close-accept.c',
- 'test-tcp-close-reset.c',
- 'test-tcp-close-while-connecting.c',
- 'test-tcp-create-socket-early.c',
- 'test-tcp-connect-error-after-write.c',
- 'test-tcp-shutdown-after-write.c',
- 'test-tcp-flags.c',
- 'test-tcp-connect-error.c',
- 'test-tcp-connect-timeout.c',
- 'test-tcp-connect6-error.c',
- 'test-tcp-open.c',
- 'test-tcp-write-to-half-open-connection.c',
- 'test-tcp-write-after-connect.c',
- 'test-tcp-writealot.c',
- 'test-tcp-write-fail.c',
- 'test-tcp-try-write.c',
- 'test-tcp-try-write-error.c',
- 'test-tcp-unexpected-read.c',
- 'test-tcp-oob.c',
- 'test-tcp-read-stop.c',
- 'test-tcp-write-queue-order.c',
- 'test-threadpool.c',
- 'test-threadpool-cancel.c',
- 'test-thread-equal.c',
- 'test-tmpdir.c',
- 'test-mutexes.c',
- 'test-thread.c',
- 'test-barrier.c',
- 'test-condvar.c',
- 'test-timer-again.c',
- 'test-timer-from-check.c',
- 'test-timer.c',
- 'test-tty-duplicate-key.c',
- 'test-tty-escape-sequence-processing.c',
- 'test-tty.c',
- 'test-udp-alloc-cb-fail.c',
- 'test-udp-bind.c',
- 'test-udp-connect.c',
- 'test-udp-create-socket-early.c',
- 'test-udp-dgram-too-big.c',
- 'test-udp-ipv6.c',
- 'test-udp-open.c',
- 'test-udp-options.c',
- 'test-udp-send-and-recv.c',
- 'test-udp-send-hang-loop.c',
- 'test-udp-send-immediate.c',
- 'test-udp-send-unreachable.c',
- 'test-udp-multicast-join.c',
- 'test-udp-multicast-join6.c',
- 'test-dlerror.c',
- 'test-udp-multicast-ttl.c',
- 'test-udp-multicast-interface.c',
- 'test-udp-multicast-interface6.c',
- 'test-udp-try-send.c',
- 'test-uname.c',
- ],
- 'conditions': [
- [ 'OS=="win"', {
- 'sources': [
- 'runner-win.c',
- 'runner-win.h',
- '../src/win/snprintf.c',
- ],
- 'libraries': [ '-lws2_32' ]
- }, { # POSIX
- 'sources': [
- 'runner-unix.c',
- 'runner-unix.h',
- ],
- 'conditions': [
- [ 'OS != "zos"', {
- 'defines': [ '_GNU_SOURCE' ],
- 'cflags': [ '-Wno-long-long' ],
- 'xcode_settings': {
- 'WARNING_CFLAGS': [ '-Wno-long-long' ]
- }
- }],
- ]},
- ],
- [ 'OS in "mac dragonflybsd freebsd linux netbsd openbsd".split()', {
- 'link_settings': {
- 'libraries': [ '-lutil' ],
- },
- }],
- [ 'OS=="solaris"', { # make test-fs.c compile, needs _POSIX_C_SOURCE
- 'defines': [
- '__EXTENSIONS__',
- '_XOPEN_SOURCE=500',
- ],
- }],
- [ 'OS=="aix"', { # make test-fs.c compile, needs _POSIX_C_SOURCE
- 'defines': [
- '_ALL_SOURCE',
- '_XOPEN_SOURCE=500',
- ],
- }],
- [ 'OS == "zos"', {
- 'cflags': [ '-qxplink' ],
- 'ldflags': [ '-qxplink' ],
- }],
- ['uv_library=="shared_library"', {
- 'defines': [ 'USING_UV_SHARED=1' ],
- 'conditions': [
- [ 'OS == "zos"', {
- 'cflags': [ '-Wc,DLL' ],
- }],
- ],
- }],
- ],
- 'msvs-settings': {
- 'VCLinkerTool': {
- 'SubSystem': 1, # /subsystem:console
- },
- },
- },
-
- {
- 'target_name': 'run-benchmarks',
- 'type': 'executable',
- 'dependencies': [ '../uv.gyp:libuv' ],
- 'sources': [
- 'benchmark-async.c',
- 'benchmark-async-pummel.c',
- 'benchmark-fs-stat.c',
- 'benchmark-getaddrinfo.c',
- 'benchmark-list.h',
- 'benchmark-loop-count.c',
- 'benchmark-million-async.c',
- 'benchmark-million-timers.c',
- 'benchmark-multi-accept.c',
- 'benchmark-ping-pongs.c',
- 'benchmark-ping-udp.c',
- 'benchmark-pound.c',
- 'benchmark-pump.c',
- 'benchmark-sizes.c',
- 'benchmark-spawn.c',
- 'benchmark-thread.c',
- 'benchmark-tcp-write-batch.c',
- 'benchmark-udp-pummel.c',
- 'dns-server.c',
- 'echo-server.c',
- 'blackhole-server.c',
- 'run-benchmarks.c',
- 'runner.c',
- 'runner.h',
- 'task.h',
- ],
- 'conditions': [
- [ 'OS=="win"', {
- 'sources': [
- 'runner-win.c',
- 'runner-win.h',
- '../src/win/snprintf.c',
- ],
- 'libraries': [ '-lws2_32' ]
- }, { # POSIX
- 'defines': [ '_GNU_SOURCE' ],
- 'sources': [
- 'runner-unix.c',
- 'runner-unix.h',
- ]
- }],
- [ 'OS == "zos"', {
- 'cflags': [ '-qxplink' ],
- 'ldflags': [ '-qxplink' ],
- }],
- ['uv_library=="shared_library"', {
- 'defines': [ 'USING_UV_SHARED=1' ],
- 'conditions': [
- [ 'OS == "zos"', {
- 'cflags': [ '-Wc,DLL' ],
- }],
- ],
- }],
- ],
- 'msvs-settings': {
- 'VCLinkerTool': {
- 'SubSystem': 1, # /subsystem:console
- },
- },
- },
- ],
-}
diff --git a/uv.gyp b/uv.gyp
deleted file mode 100644
index 189a89c9..00000000
--- a/uv.gyp
+++ /dev/null
@@ -1,370 +0,0 @@
-{
- 'variables': {
- 'conditions': [
- ['OS=="win"', {
- 'shared_unix_defines': [ ],
- }, {
- 'shared_unix_defines': [
- '_LARGEFILE_SOURCE',
- '_FILE_OFFSET_BITS=64',
- ],
- }],
- ['OS in "mac ios"', {
- 'shared_mac_defines': [ '_DARWIN_USE_64_BIT_INODE=1' ],
- }, {
- 'shared_mac_defines': [ ],
- }],
- ['OS=="zos"', {
- 'shared_zos_defines': [
- '_ISOC99_SOURCE',
- '_UNIX03_THREADS',
- '_UNIX03_SOURCE',
- '_UNIX03_WITHDRAWN',
- '_OPEN_SYS_IF_EXT',
- '_OPEN_SYS_SOCK_EXT3',
- '_OPEN_SYS_SOCK_IPV6',
- '_OPEN_MSGQ_EXT',
- '_XOPEN_SOURCE_EXTENDED',
- '_ALL_SOURCE',
- '_LARGE_TIME_API',
- '_OPEN_SYS_FILE_EXT',
- '_AE_BIMODAL',
- 'PATH_MAX=255'
- ],
- }, {
- 'shared_zos_defines': [ ],
- }],
- ],
- },
-
- 'targets': [
- {
- 'target_name': 'libuv',
- 'type': '<(uv_library)',
- 'include_dirs': [
- 'include',
- 'src/',
- ],
- 'defines': [
- '<@(shared_mac_defines)',
- '<@(shared_unix_defines)',
- '<@(shared_zos_defines)',
- ],
- 'direct_dependent_settings': {
- 'defines': [
- '<@(shared_mac_defines)',
- '<@(shared_unix_defines)',
- '<@(shared_zos_defines)',
- ],
- 'include_dirs': [ 'include' ],
- 'conditions': [
- ['OS == "linux"', {
- 'defines': [ '_POSIX_C_SOURCE=200112' ],
- }],
- ],
- },
- 'sources': [
- 'common.gypi',
- 'include/uv.h',
- 'include/uv/tree.h',
- 'include/uv/errno.h',
- 'include/uv/threadpool.h',
- 'include/uv/version.h',
- 'src/fs-poll.c',
- 'src/heap-inl.h',
- 'src/idna.c',
- 'src/idna.h',
- 'src/inet.c',
- 'src/queue.h',
- 'src/random.c',
- 'src/strscpy.c',
- 'src/strscpy.h',
- 'src/threadpool.c',
- 'src/timer.c',
- 'src/uv-data-getter-setters.c',
- 'src/uv-common.c',
- 'src/uv-common.h',
- 'src/version.c'
- ],
- 'xcode_settings': {
- 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
- 'WARNING_CFLAGS': [
- '-Wall',
- '-Wextra',
- '-Wno-unused-parameter',
- '-Wstrict-prototypes',
- ],
- 'OTHER_CFLAGS': [ '-g', '--std=gnu89' ],
- },
- 'conditions': [
- [ 'OS=="win"', {
- 'defines': [
- '_WIN32_WINNT=0x0600',
- '_GNU_SOURCE',
- ],
- 'sources': [
- 'include/uv/win.h',
- 'src/win/async.c',
- 'src/win/atomicops-inl.h',
- 'src/win/core.c',
- 'src/win/detect-wakeup.c',
- 'src/win/dl.c',
- 'src/win/error.c',
- 'src/win/fs.c',
- 'src/win/fs-event.c',
- 'src/win/getaddrinfo.c',
- 'src/win/getnameinfo.c',
- 'src/win/handle.c',
- 'src/win/handle-inl.h',
- 'src/win/internal.h',
- 'src/win/loop-watcher.c',
- 'src/win/pipe.c',
- 'src/win/thread.c',
- 'src/win/poll.c',
- 'src/win/process.c',
- 'src/win/process-stdio.c',
- 'src/win/req-inl.h',
- 'src/win/signal.c',
- 'src/win/snprintf.c',
- 'src/win/stream.c',
- 'src/win/stream-inl.h',
- 'src/win/tcp.c',
- 'src/win/tty.c',
- 'src/win/udp.c',
- 'src/win/util.c',
- 'src/win/winapi.c',
- 'src/win/winapi.h',
- 'src/win/winsock.c',
- 'src/win/winsock.h',
- ],
- 'link_settings': {
- 'libraries': [
- '-ladvapi32',
- '-liphlpapi',
- '-lpsapi',
- '-lshell32',
- '-luser32',
- '-luserenv',
- '-lws2_32'
- ],
- },
- }, { # Not Windows i.e. POSIX
- 'sources': [
- 'include/uv/unix.h',
- 'include/uv/linux.h',
- 'include/uv/sunos.h',
- 'include/uv/darwin.h',
- 'include/uv/bsd.h',
- 'include/uv/aix.h',
- 'src/unix/async.c',
- 'src/unix/atomic-ops.h',
- 'src/unix/core.c',
- 'src/unix/dl.c',
- 'src/unix/fs.c',
- 'src/unix/getaddrinfo.c',
- 'src/unix/getnameinfo.c',
- 'src/unix/internal.h',
- 'src/unix/loop.c',
- 'src/unix/loop-watcher.c',
- 'src/unix/pipe.c',
- 'src/unix/poll.c',
- 'src/unix/process.c',
- 'src/unix/random-devurandom.c',
- 'src/unix/signal.c',
- 'src/unix/spinlock.h',
- 'src/unix/stream.c',
- 'src/unix/tcp.c',
- 'src/unix/thread.c',
- 'src/unix/tty.c',
- 'src/unix/udp.c',
- ],
- 'link_settings': {
- 'libraries': [ '-lm' ],
- 'conditions': [
- ['OS=="solaris"', {
- 'ldflags': [ '-pthreads' ],
- }],
- [ 'OS=="zos" and uv_library=="shared_library"', {
- 'ldflags': [ '-Wl,DLL' ],
- }],
- ['OS != "solaris" and OS != "android" and OS != "zos"', {
- 'ldflags': [ '-pthread' ],
- }],
- ],
- },
- 'conditions': [
- ['uv_library=="shared_library"', {
- 'conditions': [
- ['OS=="zos"', {
- 'cflags': [ '-qexportall' ],
- }, {
- 'cflags': [ '-fPIC' ],
- }],
- ],
- }],
- ['uv_library=="shared_library" and OS!="mac" and OS!="zos"', {
- # This will cause gyp to set soname
- # Must correspond with UV_VERSION_MAJOR
- # in include/uv/version.h
- 'product_extension': 'so.1',
- }],
- ],
- }],
- [ 'OS in "linux mac ios android zos"', {
- 'sources': [ 'src/unix/proctitle.c' ],
- }],
- [ 'OS != "zos"', {
- 'cflags': [
- '-fvisibility=hidden',
- '-g',
- '--std=gnu89',
- '-Wall',
- '-Wextra',
- '-Wno-unused-parameter',
- '-Wstrict-prototypes',
- ],
- }],
- [ 'OS in "mac ios"', {
- 'sources': [
- 'src/unix/darwin.c',
- 'src/unix/fsevents.c',
- 'src/unix/darwin-proctitle.c',
- 'src/unix/random-getentropy.c',
- ],
- 'defines': [
- '_DARWIN_USE_64_BIT_INODE=1',
- '_DARWIN_UNLIMITED_SELECT=1',
- ]
- }],
- [ 'OS=="linux"', {
- 'defines': [ '_GNU_SOURCE' ],
- 'sources': [
- 'src/unix/linux-core.c',
- 'src/unix/linux-inotify.c',
- 'src/unix/linux-syscalls.c',
- 'src/unix/linux-syscalls.h',
- 'src/unix/procfs-exepath.c',
- 'src/unix/random-getrandom.c',
- 'src/unix/random-sysctl-linux.c',
- 'src/unix/sysinfo-loadavg.c',
- ],
- 'link_settings': {
- 'libraries': [ '-ldl', '-lrt' ],
- },
- }],
- [ 'OS=="android"', {
- 'sources': [
- 'src/unix/linux-core.c',
- 'src/unix/linux-inotify.c',
- 'src/unix/linux-syscalls.c',
- 'src/unix/linux-syscalls.h',
- 'src/unix/pthread-fixes.c',
- 'src/unix/android-ifaddrs.c',
- 'src/unix/procfs-exepath.c',
- 'src/unix/random-getrandom.c',
- 'src/unix/random-sysctl-linux.c',
- 'src/unix/sysinfo-loadavg.c',
- 'src/unix/random-getentropy.c',
- ],
- 'link_settings': {
- 'libraries': [ '-ldl' ],
- },
- }],
- [ 'OS=="solaris"', {
- 'sources': [
- 'src/unix/no-proctitle.c',
- 'src/unix/sunos.c',
- ],
- 'defines': [
- '__EXTENSIONS__',
- '_XOPEN_SOURCE=500',
- ],
- 'link_settings': {
- 'libraries': [
- '-lkstat',
- '-lnsl',
- '-lsendfile',
- '-lsocket',
- ],
- },
- }],
- [ 'OS=="aix"', {
- 'variables': {
- 'os_name': '