From cc20967556abe4ee9732f79343eb55bebbc4c46a Mon Sep 17 00:00:00 2001 From: Jason Ginchereau Date: Mon, 15 May 2017 10:13:56 -0700 Subject: [PATCH] n-api: Make sources conditional on V8 / ChakraCore PR-URL: https://github.com/nodejs/node-chakracore/pull/238 Reviewed-By: Taylor Woll Reviewed-By: Kyle Farnung --- node.gyp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/node.gyp b/node.gyp index 22e866db3cc..af6a3baf22f 100644 --- a/node.gyp +++ b/node.gyp @@ -167,8 +167,6 @@ 'src/handle_wrap.cc', 'src/js_stream.cc', 'src/node.cc', -# 'src/node_api.cc', - 'src/node_api_jsrt.cc', 'src/node_buffer.cc', 'src/node_config.cc', 'src/node_constants.cc', @@ -266,6 +264,18 @@ # Warn when using deprecated V8 APIs. 'V8_DEPRECATION_WARNINGS=1', ], + + 'conditions': [ + [ 'node_engine=="chakracore"', { + 'sources': [ + 'src/node_api_jsrt.cc', + ], + }, { + 'sources': [ + 'src/node_api.cc', + ], + }], + ], }, { 'target_name': 'mkssldef',