Commit ed34a736 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[gcmole] Update bootstrap script for static linkage.

This changes gcmole's bootstrapping script so that it always creates
binaries that link libstdc++ statically (both plugin and Clang) and do
not link against unneeded libraries (only Clang). For deployment of
gcmole on our infrastructure, it is much easier to have fewer external
dependencies.

R=machenbach@chromium.org
BUG=v8:8813

Change-Id: If6f2f3cc3b1f661f7dafbb406eaaf2e639981640
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526002Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60262}
parent f9f46063
......@@ -39,7 +39,8 @@ libgcmole.so: gcmole.cc
-D__STDC_LIMIT_MACROS -O3 -fomit-frame-pointer -fno-exceptions \
-fno-rtti -fPIC -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing \
-pedantic -Wno-long-long -Wall -W -Wno-unused-parameter \
-Wwrite-strings -std=c++0x -shared -o libgcmole.so gcmole.cc
-Wwrite-strings -static-libstdc++ -std=c++0x -shared -o libgcmole.so \
gcmole.cc
clean:
$(RM) libgcmole.so
......@@ -27,10 +27,11 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# This script will build libgcmole.so. Building a recent clang needs a
# recent GCC, so if you explicitly want to use e.g. GCC 4.8, use:
#
# CC=gcc-4.8 CPP=cpp-4.8 CXX=g++-4.8 CXXFLAGS=-static-libstdc++ CXXCPP=cpp-4.8 ./bootstrap.sh
# This script will build libgcmole.so as well as a corresponding recent
# version of Clang and LLVM. The Clang will be built with the locally
# installed compiler and statically link against the local libstdc++ so
# that the resulting binary is easier transferable between different
# environments.
CLANG_RELEASE=8.0
......@@ -102,7 +103,8 @@ if [ ! -e "${BUILD_DIR}" ]; then
mkdir "${BUILD_DIR}"
fi
cd "${BUILD_DIR}"
cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=clang "${LLVM_DIR}"
cmake -DCMAKE_CXX_FLAGS="-static-libstdc++" -DLLVM_ENABLE_TERMINFO=OFF \
-DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=clang "${LLVM_DIR}"
MACOSX_DEPLOYMENT_TARGET=10.5 make -j"${NUM_JOBS}"
# Strip the clang binary.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment