dddd5b0a9b
We are passing flags to `configure.py` in order to tell the nodejs build toolchain to use shared libraries. The toolchain seems to mistakenly also try use shared libraries for host build, but it does not add respective linker flags (For example `-lz` for zlib). This commit hardcodes these flags to be always passed to linker by setting linker to linker + LDFLAGS of shared libraries
112 lines
3.1 KiB
Diff
112 lines
3.1 KiB
Diff
diff -uNr node-v16.6.1/node.gyp node-v16.6.1.mod/node.gyp
|
|
--- node-v16.6.1/node.gyp 2021-08-03 05:54:26.000000000 +0000
|
|
+++ node-v16.6.1.mod/node.gyp 2021-08-07 05:43:34.342341704 +0000
|
|
@@ -1062,107 +1062,6 @@
|
|
],
|
|
}, # fuzz_env
|
|
{
|
|
- 'target_name': 'cctest',
|
|
- 'type': 'executable',
|
|
-
|
|
- 'dependencies': [
|
|
- '<(node_lib_target_name)',
|
|
- 'deps/googletest/googletest.gyp:gtest',
|
|
- 'deps/googletest/googletest.gyp:gtest_main',
|
|
- 'deps/histogram/histogram.gyp:histogram',
|
|
- 'deps/uvwasi/uvwasi.gyp:uvwasi',
|
|
- 'node_dtrace_header',
|
|
- 'node_dtrace_ustack',
|
|
- 'node_dtrace_provider',
|
|
- ],
|
|
-
|
|
- 'includes': [
|
|
- 'node.gypi'
|
|
- ],
|
|
-
|
|
- 'include_dirs': [
|
|
- 'src',
|
|
- 'tools/msvs/genfiles',
|
|
- 'deps/v8/include',
|
|
- 'deps/cares/include',
|
|
- 'deps/uv/include',
|
|
- 'deps/uvwasi/include',
|
|
- 'test/cctest',
|
|
- ],
|
|
-
|
|
- 'defines': [
|
|
- 'NODE_ARCH="<(target_arch)"',
|
|
- 'NODE_PLATFORM="<(OS)"',
|
|
- 'NODE_WANT_INTERNALS=1',
|
|
- ],
|
|
-
|
|
- 'sources': [
|
|
- 'src/node_snapshot_stub.cc',
|
|
- 'src/node_code_cache_stub.cc',
|
|
- 'test/cctest/node_test_fixture.cc',
|
|
- 'test/cctest/node_test_fixture.h',
|
|
- 'test/cctest/test_aliased_buffer.cc',
|
|
- 'test/cctest/test_base64.cc',
|
|
- 'test/cctest/test_base_object_ptr.cc',
|
|
- 'test/cctest/test_node_postmortem_metadata.cc',
|
|
- 'test/cctest/test_environment.cc',
|
|
- 'test/cctest/test_js_native_api_v8.cc',
|
|
- 'test/cctest/test_linked_binding.cc',
|
|
- 'test/cctest/test_node_api.cc',
|
|
- 'test/cctest/test_per_process.cc',
|
|
- 'test/cctest/test_platform.cc',
|
|
- 'test/cctest/test_json_utils.cc',
|
|
- 'test/cctest/test_sockaddr.cc',
|
|
- 'test/cctest/test_traced_value.cc',
|
|
- 'test/cctest/test_util.cc',
|
|
- 'test/cctest/test_url.cc',
|
|
- ],
|
|
-
|
|
- 'conditions': [
|
|
- [ 'node_use_openssl=="true"', {
|
|
- 'defines': [
|
|
- 'HAVE_OPENSSL=1',
|
|
- ],
|
|
- 'sources': [
|
|
- 'test/cctest/test_node_crypto.cc',
|
|
- ]
|
|
- }],
|
|
- ['v8_enable_inspector==1', {
|
|
- 'sources': [
|
|
- 'test/cctest/test_inspector_socket.cc',
|
|
- 'test/cctest/test_inspector_socket_server.cc'
|
|
- ],
|
|
- 'defines': [
|
|
- 'HAVE_INSPECTOR=1',
|
|
- ],
|
|
- }, {
|
|
- 'defines': [
|
|
- 'HAVE_INSPECTOR=0',
|
|
- ]
|
|
- }],
|
|
- ['OS=="solaris"', {
|
|
- 'ldflags': [ '-I<(SHARED_INTERMEDIATE_DIR)' ]
|
|
- }],
|
|
- # Skip cctest while building shared lib node for Windows
|
|
- [ 'OS=="win" and node_shared=="true"', {
|
|
- 'type': 'none',
|
|
- }],
|
|
- [ 'node_shared=="true"', {
|
|
- 'xcode_settings': {
|
|
- 'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
|
|
- },
|
|
- }],
|
|
- ['OS=="win"', {
|
|
- 'libraries': [
|
|
- 'Dbghelp.lib',
|
|
- 'winmm.lib',
|
|
- 'Ws2_32.lib',
|
|
- ],
|
|
- }],
|
|
- ],
|
|
- }, # cctest
|
|
-
|
|
- {
|
|
'target_name': 'embedtest',
|
|
'type': 'executable',
|
|
|