File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,11 @@ main() {
16
16
17
17
mkdir -p " $RELEASE_PATH /bin"
18
18
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
21
24
22
25
ln -s " ./bin/code-server" " $RELEASE_PATH /code-server"
23
26
ln -s " ./lib/node" " $RELEASE_PATH /node"
@@ -26,4 +29,11 @@ main() {
26
29
yarn --production --frozen-lockfile
27
30
}
28
31
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
+
29
39
main " $@ "
Original file line number Diff line number Diff line change @@ -17,4 +17,5 @@ bin_dir() {
17
17
}
18
18
19
19
BIN_DIR=$( bin_dir)
20
+ export LD_LIBRARY_PATH=" $BIN_DIR /../lib${LD_LIBRARY_PATH+: $LD_LIBRARY_PATH } "
20
21
exec " $BIN_DIR /../lib/node" " $BIN_DIR /.." " $@ "
You can’t perform that action at this time.
0 commit comments