forked from rubyjs/libv8-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-monolith
More file actions
executable file
·39 lines (31 loc) · 1.82 KB
/
build-monolith
File metadata and controls
executable file
·39 lines (31 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
set -e
set -u
libexec="$(cd "$(dirname "$0")"; pwd)"
top="${libexec}/.."
src="${2:-"${top}/src"}"
version="${1:-$("${libexec}/metadata" node_version)}"
cd "${src}/node-v${version}"
BASEDIR="${PWD}"
BUILDTYPE="${BUILDTYPE:-Release}"
LIBV8_MONOLITH="libv8_monolith.a"
cd "out/${BUILDTYPE}/obj.target"
platform=$(uname)
rm -f "${LIBV8_MONOLITH}"
case "${platform}" in
"SunOS")
/usr/xpg4/bin/find . '(' '!' -path './icutools/deps/icu-small/source/stubdata/stubdata.o' ')' -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" -or -path './abseil/deps/v8/third_party/abseil-cpp/absl/**/*.o' -or -path './highway/deps/v8/third_party/highway/**/*.o' -or -path './simdutf/deps/v8/third_party/simdutf/*.o' | sort | uniq | xargs ar cq "${LIBV8_MONOLITH}"
;;
"Darwin")
/usr/bin/find . '(' '!' -path './icutools/deps/icu-small/source/stubdata/stubdata.o' ')' -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" -or -path './abseil/deps/v8/third_party/abseil-cpp/absl/**/*.o' -or -path './highway/deps/v8/third_party/highway/**/*.o' -or -path './simdutf/deps/v8/third_party/simdutf/*.o' | sort | uniq | xargs /usr/bin/ar -cq "${LIBV8_MONOLITH}"
;;
"Linux")
find . '(' '!' -path './icutools/deps/icu-small/source/stubdata/stubdata.o' ')' -and '(' -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" -or -path './abseil/deps/v8/third_party/abseil-cpp/absl/**/*.o' -or -path './highway/deps/v8/third_party/highway/**/*.o' -or -path './simdutf/deps/v8/third_party/simdutf/*.o' ')' | sort | uniq | xargs ar -cqSP "${LIBV8_MONOLITH}"
ar -sP "${LIBV8_MONOLITH}"
;;
*)
echo "Unsupported platform: ${platform}"
exit 1
;;
esac
mv -f "${LIBV8_MONOLITH}" "${BASEDIR}/out/${BUILDTYPE}/${LIBV8_MONOLITH}"