Skip to content

Commit

Permalink
Added 1.75.0-clang-libc++
Browse files Browse the repository at this point in the history
  • Loading branch information
Preston A Elder committed Jan 8, 2021
1 parent 050c17c commit 8b67dc4
Show file tree
Hide file tree
Showing 45 changed files with 1,562 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/aws-sdk-cpp/20201201/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function mason_compile {

# Take the C++ Standard OUT of CXXFLAGS (it is specified below).
CXXFLAGS=${CXXFLAGS//-std=c++11/}
CXXFLAGS=${CXXFLAGS//-stdlib=libc++/}

CFLAGS=${CXXFLAGS//-mmacosx-version-min=10.8/-mmacosx-version-min=10.13}
CXXFLAGS=${CXXFLAGS//-mmacosx-version-min=10.8/-mmacosx-version-min=10.13}
Expand Down
7 changes: 7 additions & 0 deletions scripts/boost/1.75.0-clang-libc++/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
jobs:
include:
- os: linux

script:
- ./mason build ${MASON_NAME} ${MASON_VERSION}
- ./mason publish ${MASON_NAME} ${MASON_VERSION}
13 changes: 13 additions & 0 deletions scripts/boost/1.75.0-clang-libc++/base.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# NOTE: use the ./utils/new_boost.sh script to create new versions

export MASON_VERSION="$( basename "$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )" )"
export BOOST_VERSION="$( echo "${MASON_VERSION}" | sed 's/-.*$//' )"
export BOOST_VERSION_UC=${BOOST_VERSION//./_}
export BOOST_TOOLSET=$(CC=${CC#ccache }; basename -- ${CC%% *})
export BOOST_TOOLSET_CXX=$(CXX=${CXX#ccache }; basename -- ${CXX%% *})
export BOOST_ARCH="x86"
export BOOST_SHASUM=1a5d6590555afdfada1428f1469ec2a8053e10b5
# special override to ensure each library shares the cached download
export MASON_DOWNLOAD_SLUG="boost-${BOOST_VERSION}"
81 changes: 81 additions & 0 deletions scripts/boost/1.75.0-clang-libc++/common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#!/usr/bin/env bash

function mason_load_source {
mason_download \
https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_UC}.tar.bz2 \
${BOOST_SHASUM}

export MASON_BUILD_PATH=${MASON_ROOT}/.build/boost_${BOOST_VERSION_UC}

mason_extract_tar_bz2
}

function gen_config() {

echo "using $1 : : $(which $2)" > user-config.jam
if [[ "${AR:-false}" != false ]] || [[ "${RANLIB:-false}" != false ]]; then
echo " :" >> user-config.jam
if [[ "${AR:-false}" != false ]]; then
echo " <archiver>${AR}" >> user-config.jam
fi
if [[ "${RANLIB:-false}" != false ]]; then
echo " <ranlib>${RANLIB}" >> user-config.jam
fi
fi
echo ' ;' >> user-config.jam
}

function mason_prepare_compile {
LLVM_VERSION=10.0.0
${MASON_DIR}/mason install clang++ ${LLVM_VERSION}
MASON_LLVM=$(${MASON_DIR}/mason prefix clang++ ${LLVM_VERSION})
}

function mason_compile {
CXXFLAGS=${CXXFLAGS//-std=c++11/}
CXXFLAGS=${CXXFLAGS//-stdlib=libc++/}

CFLAGS=${CXXFLAGS//-mmacosx-version-min=10.8/-mmacosx-version-min=10.13}
CXXFLAGS=${CXXFLAGS//-mmacosx-version-min=10.8/-mmacosx-version-min=10.13}

export PATH="${MASON_LLVM}/bin:${PATH}"
gen_config ${BOOST_TOOLSET} ${BOOST_TOOLSET_CXX}

if [[ ! -f ./b2 ]] ; then
./bootstrap.sh
fi
./b2 \
--with-${BOOST_LIBRARY} \
--prefix=${MASON_PREFIX} \
-j${MASON_CONCURRENCY} \
-d0 \
--ignore-site-config --user-config=user-config.jam \
architecture="${BOOST_ARCH}" \
toolset="${BOOST_TOOLSET}" \
link=static \
variant=release \
stdlib=libc++ \
cxxstd=20 \
linkflags="${LDFLAGS:-" "}" \
cxxflags="${CXXFLAGS:-" "}" \
stage
mkdir -p $(dirname ${MASON_PREFIX}/${MASON_LIB_FILE})
mv stage/${MASON_LIB_FILE} ${MASON_PREFIX}/${MASON_LIB_FILE}
}

function mason_prefix {
echo "${MASON_PREFIX}"
}

function mason_cflags {
echo "-I${MASON_PREFIX}/include"
}

function mason_ldflags {
local LOCAL_LDFLAGS
LOCAL_LDFLAGS="-L${MASON_PREFIX}/lib"
if [[ ${BOOST_LIBRARY:-false} != false ]]; then
LOCAL_LDFLAGS="${LOCAL_LDFLAGS} -lboost_${BOOST_LIBRARY}"
fi
echo $LOCAL_LDFLAGS
}

0 comments on commit 8b67dc4

Please sign in to comment.