From b06a546edef6d4abad70c8a638d264855e1449ba Mon Sep 17 00:00:00 2001 From: Ayushman Chhabra Date: Fri, 3 Mar 2023 03:52:42 -0500 Subject: [PATCH 1/6] Fix error when generating Node build files --- common.gypi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common.gypi b/common.gypi index 3be408bdd1..41482674f8 100644 --- a/common.gypi +++ b/common.gypi @@ -65,7 +65,7 @@ # Enable disassembler for `--print-code` v8 options 'v8_enable_disassembler': 1, - 'v8_host_byteorder': ' Date: Mon, 6 Mar 2023 17:48:14 -0500 Subject: [PATCH 2/6] build: fix sysroot name --- common.gypi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.gypi b/common.gypi index 41482674f8..cf49211d51 100644 --- a/common.gypi +++ b/common.gypi @@ -129,7 +129,7 @@ 'sysroot': ' Date: Mon, 6 Mar 2023 18:35:51 -0500 Subject: [PATCH 3/6] build: do not use host linker --- common.gypi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common.gypi b/common.gypi index cf49211d51..cb2255ce3b 100644 --- a/common.gypi +++ b/common.gypi @@ -166,6 +166,11 @@ ['CXX.host', '$(CXX)'], ], }], + [ 'OS == "linux" and building_nw==1', { + 'make_global_settings': [ + ['LD', 'third_party/llvm-build/Release+Asserts/bin/lld-link'], + ], + }], [ 'clang==1 and OS == "win" and building_nw==1', { 'make_global_settings': [ ['CC', 'third_party/llvm-build/Release+Asserts/bin/clang-cl'], From f2ae0c2bc0da910d7a141a6d8a12673dd21e6543 Mon Sep 17 00:00:00 2001 From: Ayushman Chhabra Date: Tue, 7 Mar 2023 12:16:30 -0500 Subject: [PATCH 4/6] build: resolve nw link error --- node.gypi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/node.gypi b/node.gypi index 070eef9911..f03374c1d4 100644 --- a/node.gypi +++ b/node.gypi @@ -317,7 +317,9 @@ '-Wl,--no-whole-archive' ] }], [ 'OS=="linux" and component != "shared_library"', { - 'ldflags': [ '-L<(PRODUCT_DIR)/../nw/lib/', '-lnw', + 'ldflags': [ '-L<(PRODUCT_DIR)/../nw/lib/', + # '-lnw', + '-L<(PRODUCT_DIR)/../nw/' '-Wl,--whole-archive', '<(LIBCXX)', '-Wl,--no-whole-archive' From 008b01640edef824fd1e5f14d0dcbb4f1cf0c09d Mon Sep 17 00:00:00 2001 From: Ayushman Chhabra Date: Wed, 8 Mar 2023 16:02:37 -0500 Subject: [PATCH 5/6] build: link nw --- node.gypi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/node.gypi b/node.gypi index f03374c1d4..cda2d902be 100644 --- a/node.gypi +++ b/node.gypi @@ -318,8 +318,7 @@ }], [ 'OS=="linux" and component != "shared_library"', { 'ldflags': [ '-L<(PRODUCT_DIR)/../nw/lib/', - # '-lnw', - '-L<(PRODUCT_DIR)/../nw/' + '-lnw', '-Wl,--whole-archive', '<(LIBCXX)', '-Wl,--no-whole-archive' From d5a617bbcfdbc91ce608c201af7708d9266a89df Mon Sep 17 00:00:00 2001 From: Ayushman Chhabra Date: Thu, 9 Mar 2023 21:36:59 -0500 Subject: [PATCH 6/6] build: revert redundant config changes --- common.gypi | 5 ----- node.gypi | 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/common.gypi b/common.gypi index cb2255ce3b..cf49211d51 100644 --- a/common.gypi +++ b/common.gypi @@ -166,11 +166,6 @@ ['CXX.host', '$(CXX)'], ], }], - [ 'OS == "linux" and building_nw==1', { - 'make_global_settings': [ - ['LD', 'third_party/llvm-build/Release+Asserts/bin/lld-link'], - ], - }], [ 'clang==1 and OS == "win" and building_nw==1', { 'make_global_settings': [ ['CC', 'third_party/llvm-build/Release+Asserts/bin/clang-cl'], diff --git a/node.gypi b/node.gypi index cda2d902be..070eef9911 100644 --- a/node.gypi +++ b/node.gypi @@ -317,8 +317,7 @@ '-Wl,--no-whole-archive' ] }], [ 'OS=="linux" and component != "shared_library"', { - 'ldflags': [ '-L<(PRODUCT_DIR)/../nw/lib/', - '-lnw', + 'ldflags': [ '-L<(PRODUCT_DIR)/../nw/lib/', '-lnw', '-Wl,--whole-archive', '<(LIBCXX)', '-Wl,--no-whole-archive'