From 49ddd36f13fe965cb9890642a14213756e7c90d0 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Tue, 3 Mar 2020 15:02:02 -0500 Subject: [PATCH] build: fix building with ninja The ninja build places objects in a different directory. Co-authored-by: Gabriel Schulhof Signed-off-by: Richard Lau Backport-PR-URL: https://github.com/nodejs/node/pull/32092 PR-URL: https://github.com/nodejs/node/pull/32071 Reviewed-By: Matheus Marchini Reviewed-By: Gabriel Schulhof Reviewed-By: Sam Roberts Reviewed-By: Shelley Vohr Reviewed-By: Myles Borins Reviewed-By: Jiawen Geng --- node.gyp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/node.gyp b/node.gyp index 8afa563c6a6225..08aebe56e7437f 100644 --- a/node.gyp +++ b/node.gyp @@ -248,6 +248,11 @@ 'node_mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_mksnapshot<(EXECUTABLE_SUFFIX)', 'mkcodecache_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mkcodecache<(EXECUTABLE_SUFFIX)', 'conditions': [ + ['GENERATOR == "ninja"', { + 'node_text_start_object_path': 'src/large_pages/node_text_start.node_text_start.o' + }, { + 'node_text_start_object_path': 'node_text_start/src/large_pages/node_text_start.o' + }], [ 'node_shared=="true"', { 'node_target_type%': 'shared_library', 'conditions': [ @@ -513,7 +518,7 @@ 'target_arch=="x64"', { 'dependencies': [ 'node_text_start' ], 'ldflags+': [ - '<(PRODUCT_DIR)/obj.target/node_text_start/src/large_pages/node_text_start.o' + '<(obj_dir)/<(node_text_start_object_path)' ] }], ],