File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,11 @@ main() {
1616
1717 mkdir -p " $RELEASE_PATH /bin"
1818 rsync ./ci/build/code-server.sh " $RELEASE_PATH /bin/code-server"
19-
20- g++ -Wl,--allow-multiple-definition " $node_path " -static-libstdc++ -static-libgcc -o " $RELEASE_PATH /lib/node"
19+ rsync " $node_path " " $RELEASE_PATH /lib/node"
20+ if [[ $OS == " linux" ]]; then
21+ bundle_dynamic_lib libstdc++
22+ bundle_dynamic_lib libgcc_s
23+ fi
2124
2225 ln -s " ./bin/code-server" " $RELEASE_PATH /code-server"
2326 ln -s " ./lib/node" " $RELEASE_PATH /node"
@@ -26,4 +29,11 @@ main() {
2629 yarn --production --frozen-lockfile
2730}
2831
32+ bundle_dynamic_lib () {
33+ lib_name=" $1 "
34+ lib_path=" $( ldd " $RELEASE_PATH /lib/node" | grep " $lib_name " | awk ' {print $3 }' ) "
35+
36+ cp " $lib_path " " $RELEASE_PATH /lib/"
37+ }
38+
2939main " $@ "
Original file line number Diff line number Diff line change @@ -17,4 +17,5 @@ bin_dir() {
1717}
1818
1919BIN_DIR=$( bin_dir)
20+ export LD_LIBRARY_PATH=" $BIN_DIR /../lib${LD_LIBRARY_PATH+: $LD_LIBRARY_PATH } "
2021exec " $BIN_DIR /../lib/node" " $BIN_DIR /.." " $@ "
You can’t perform that action at this time.
0 commit comments