From 6d3a39df826c88e4ab12b937bef06c5905c08ab7 Mon Sep 17 00:00:00 2001 From: Jeroen Ooms Date: Mon, 29 Jul 2019 20:15:14 +0200 Subject: [PATCH 4/4] build: include stubs in shared library This is needed for external applications that link to shared libnode. Fixes #27431 --- node.gyp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/node.gyp b/node.gyp index 55b7da02ccaf1835b5fd986aaa320d72f8b7fbf2..4eae262a61e77bb8a9556e42a241b83eda3f0eba 100644 --- a/node.gyp +++ b/node.gyp @@ -684,10 +684,16 @@ # - "C4244: conversion from 'type1' to 'type2', possible loss of data" # Ususaly safe. Disable for `dep`, enable for `src` 'msvs_disabled_warnings!': [4244], 'conditions': [ + [ 'node_shared=="true"', { + 'sources': [ + 'src/node_snapshot_stub.cc', + 'src/node_code_cache_stub.cc', + ] + }], [ 'node_shared=="true" and node_module_version!="" and OS!="win"', { 'product_extension': '<(shlib_suffix)', 'xcode_settings': { 'LD_DYLIB_INSTALL_NAME': '@rpath/lib<(node_core_target_name).<(shlib_suffix)' -- 2.21.0