Mercurial > hg > orthanc-gcp
view Resources/holy-build-box-internal.sh @ 12:42a6a2dd54ff
stripping binary in holy build box to reduce binary size
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 18 Jun 2019 09:24:34 +0200 |
parents | cd1231292eb6 |
children | b7fa5e51367c |
line wrap: on
line source
#!/bin/bash set -e # Activate Holy Build Box environment. source /hbb_exe/activate set -x mkdir /tmp/build cd /tmp/build # Holy Build Box defines LDFLAGS as "-L/hbb_exe/lib # -static-libstdc++". The "-L/hbb_exe/lib" option results in linking # errors "undefined reference" to `std::__once_callable', # 'std::__once_call' and '__once_proxy'. export LDFLAGS=-static-libstdc++ unset LDPATHFLAGS unset SHLIB_LDFLAGS unset LD_LIBRARY_PATH unset LIBRARY_PATH cp -r /source /tmp/source-writeable cmake /tmp/source-writeable \ -DCMAKE_BUILD_TYPE=$1 -DSTATIC_BUILD=ON \ -DORTHANC_FRAMEWORK_SOURCE=web \ -DCMAKE_INSTALL_PREFIX=/target make -j`nproc` strip ./libOrthancGoogleCloudPlatform.so make install