未验证 提交 ac9b57c0 编写于 作者: A Anmol Sethi

Properly bundle in libstdc++

上级 f1174759
......@@ -16,8 +16,11 @@ main() {
mkdir -p "$RELEASE_PATH/bin"
rsync ./ci/build/code-server.sh "$RELEASE_PATH/bin/code-server"
g++ -Wl,--allow-multiple-definition "$node_path" -static-libstdc++ -static-libgcc -o "$RELEASE_PATH/lib/node"
rsync "$node_path" "$RELEASE_PATH/lib/node"
if [[ $OS == "linux" ]]; then
bundle_dynamic_lib libstdc++
bundle_dynamic_lib libgcc_s
fi
ln -s "./bin/code-server" "$RELEASE_PATH/code-server"
ln -s "./lib/node" "$RELEASE_PATH/node"
......@@ -26,4 +29,11 @@ main() {
yarn --production --frozen-lockfile
}
bundle_dynamic_lib() {
lib_name="$1"
lib_path="$(ldd "$RELEASE_PATH/lib/node" | grep "$lib_name" | awk '{print $3 }')"
cp "$lib_path" "$RELEASE_PATH/lib/"
}
main "$@"
......@@ -17,4 +17,5 @@ bin_dir() {
}
BIN_DIR=$(bin_dir)
export LD_LIBRARY_PATH="$BIN_DIR/../lib${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}"
exec "$BIN_DIR/../lib/node" "$BIN_DIR/.." "$@"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册