From 15e6a62a0cc505a9c6db6ec74341222d6fdeea78 Mon Sep 17 00:00:00 2001 From: Tom Ritter Date: Thu, 18 Oct 2018 09:17:07 -0500 Subject: [PATCH] Bug 1500102 - Build the mingw static libc++ with debug information r=froydnj --- taskcluster/scripts/misc/build-clang-trunk-mingw.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/taskcluster/scripts/misc/build-clang-trunk-mingw.sh b/taskcluster/scripts/misc/build-clang-trunk-mingw.sh index 0211cf4c53f0..7ec63d9a13ea 100755 --- a/taskcluster/scripts/misc/build-clang-trunk-mingw.sh +++ b/taskcluster/scripts/misc/build-clang-trunk-mingw.sh @@ -168,6 +168,12 @@ EOF } build_libcxx() { + # Below, we specify -g -gcodeview to build static libraries with debug information. + # Because we're not distributing these builds, this is fine. If one were to distribute + # the builds, perhaps one would want to make those flags conditional or investigation + # other options. + DEBUG_FLAGS="-g -gcodeview" + mkdir libunwind pushd libunwind cmake \ @@ -188,7 +194,7 @@ build_libcxx() { -DLIBUNWIND_ENABLE_THREADS=TRUE \ -DLIBUNWIND_ENABLE_SHARED=FALSE \ -DLIBUNWIND_ENABLE_CROSS_UNWINDING=FALSE \ - -DCMAKE_CXX_FLAGS="-nostdinc++ -I$SRC_DIR/libcxx/include -DPSAPI_VERSION=2" \ + -DCMAKE_CXX_FLAGS="${DEBUG_FLAGS} -nostdinc++ -I$SRC_DIR/libcxx/include -DPSAPI_VERSION=2" \ $SRC_DIR/libunwind make $make_flags make $make_flags install @@ -216,7 +222,7 @@ build_libcxx() { -DLIBCXXABI_LIBCXX_INCLUDES=$SRC_DIR/libcxx/include \ -DLLVM_NO_OLD_LIBSTDCXX=TRUE \ -DCXX_SUPPORTS_CXX11=TRUE \ - -DCMAKE_CXX_FLAGS="-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_HAS_THREAD_API_WIN32" \ + -DCMAKE_CXX_FLAGS="${DEBUG_FLAGS} -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_HAS_THREAD_API_WIN32" \ $SRC_DIR/libcxxabi make $make_flags VERBOSE=1 popd @@ -249,7 +255,7 @@ build_libcxx() { -DLIBCXX_CXX_ABI=libcxxabi \ -DLIBCXX_CXX_ABI_INCLUDE_PATHS=$SRC_DIR/libcxxabi/include \ -DLIBCXX_CXX_ABI_LIBRARY_PATH=../libcxxabi/lib \ - -DCMAKE_CXX_FLAGS="-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS" \ + -DCMAKE_CXX_FLAGS="${DEBUG_FLAGS} -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS" \ $SRC_DIR/libcxx make $make_flags VERBOSE=1 make $make_flags install