import sys
import os
+# node should be build as statically linked application
+# to do this read: https://github.com/nodejs/node/issues/41497
+# or use:
+# ./configure --fully-static --enable-static --download=all --with-intl=full-icu;
+# for i in out/tools/v8_gypfiles/gen-regexp-special-case.target.mk \
+# out/test_crypto_engine.target.mk; do sed -i 's/\-static//g' $i || echo "nevermind"; done
+# make -j$(nproc)
def GetBinaryPath():
- f = open(os_path.dirname(__file__)+"/target.txt",'r')
- str = f.read().strip()
- if (str == "tizen") :
- return os_path.join(os_path.dirname(__file__),"tizen/","node")
- else :
- darwin_name = ('node-darwin-arm64' if platform.machine() == 'arm64' else
- 'node-darwin-x64')
- return os_path.join(os_path.dirname(__file__), *{
+ if os.path.exists(os_path.dirname(__file__)+"/target.txt"):
+ f = open(os_path.dirname(__file__)+"/target.txt",'r')
+ str = f.read().strip()
+ if (str == "tizen") :
+ return os_path.join(os_path.dirname(__file__),"tizen/","node")
+
+ darwin_name = ('node-darwin-arm64' if platform.machine() == 'arm64' else
+ 'node-darwin-x64')
+ return os_path.join(os_path.dirname(__file__), *{
'Darwin': ('mac', darwin_name, 'bin', 'node'),
'Linux': ('linux', 'node-linux-x64', 'bin', 'node'),
'Windows': ('win', 'node.exe'),
echo $BUILD_ARCH > host_arch.txt
fi
-echo $target > target.txt
-echo $target > third_party/node/target.txt
+if [ "$BUILD_ARCH" != "x86_64" ]; then
+ echo $target > target.txt
+ echo $target > third_party/node/target.txt
+fi
printf "GN_ARGUMENTS:\n"
for arg in $_GN_ARGS; do