Skip to content

Commit

Permalink
Modify build to statically link standard libraries on Linux. (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulthomson committed Nov 14, 2018
1 parent 22f16b3 commit 4f39efb
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions 1-install-deps-travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,20 @@ cd "${CLONE_DIR}"
git checkout $(cat ../COMMIT_ID)
python scripts/bootstrap.py
gclient sync

# Modify the build to statically link standard libraries on Linux.

cp BUILD.gn _
cat _ | awk '
/config\("external_config"\)/ {
print $0
print " if (is_linux) {"
print " ldflags = [ \"-static-libgcc\", \"-static-libstdc++\" ]"
print " }"
next
}
{
print $0
}
' > BUILD.gn

0 comments on commit 4f39efb

Please sign in to comment.