-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added aws-sdk, libwebp and boost 1.75.0 compiled with clang & libc++
- Loading branch information
Preston A Elder
committed
Jan 11, 2021
1 parent
398b0c7
commit 269f046
Showing
168 changed files
with
4,711 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
language: cpp | ||
|
||
matrix: | ||
include: | ||
- os: osx | ||
osx_image: xcode11 | ||
compiler: clang | ||
- os: linux | ||
dist: bionic | ||
compiler: clang | ||
sudo: false | ||
addons: | ||
apt: | ||
sources: [ 'ubuntu-toolchain-r-test' ] | ||
packages: [ 'zlib1g-dev', 'cmake', 'libssl-dev', 'libcurl4-openssl-dev' ] | ||
|
||
script: | ||
- ./mason build ${MASON_NAME} ${MASON_VERSION} | ||
- ./mason publish ${MASON_NAME} ${MASON_VERSION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/usr/bin/env bash | ||
|
||
MASON_NAME=aws-sdk-cpp | ||
MASON_VERSION=1.8.122 | ||
MASON_LIB_FILE=lib/libaws-cpp-sdk-core.a | ||
|
||
. ${MASON_DIR}/mason.sh | ||
|
||
function mason_load_source { | ||
mason_download \ | ||
https://github.com/aws/aws-sdk-cpp/archive/${MASON_VERSION}.tar.gz \ | ||
51a732cefcd9bf0cd117d3bc1edb58b639f519b1 | ||
|
||
mason_extract_tar_gz | ||
|
||
export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} | ||
} | ||
|
||
function mason_prepare_compile { | ||
CCACHE_VERSION=3.7.2 | ||
CMAKE_VERSION=3.15.2 | ||
LLVM_VERSION=11.0.0 | ||
${MASON_DIR}/mason install clang++ ${LLVM_VERSION} | ||
MASON_LLVM=$(${MASON_DIR}/mason prefix clang++ ${LLVM_VERSION}) | ||
${MASON_DIR}/mason install ccache ${CCACHE_VERSION} | ||
MASON_CCACHE=$(${MASON_DIR}/mason prefix ccache ${CCACHE_VERSION}) | ||
${MASON_DIR}/mason install cmake ${CMAKE_VERSION} | ||
MASON_CMAKE=$(${MASON_DIR}/mason prefix cmake ${CMAKE_VERSION}) | ||
} | ||
|
||
function mason_compile { | ||
mkdir -p build | ||
cd build | ||
|
||
# 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} | ||
CXXFLAGS="${CXXFLAGS} -stdlib=libc++" # Force use of libc++ (not libstdc++). | ||
|
||
${MASON_CMAKE}/bin/cmake ../ \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX="${MASON_PREFIX}" \ | ||
-DCMAKE_INSTALL_MESSAGE="NEVER" \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=${MASON_CCACHE}/bin/ccache \ | ||
-DCMAKE_C_COMPILER_LAUNCHER=${MASON_CCACHE}/bin/ccache \ | ||
-DCMAKE_CXX_COMPILER="${MASON_LLVM}/bin/clang++" \ | ||
-DCMAKE_C_COMPILER="${MASON_LLVM}/bin/clang" \ | ||
-DCMAKE_C_FLAGS="${CFLAGS}" \ | ||
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \ | ||
-DCPP_STANDARD=20 \ | ||
-DBUILD_SHARED_LIBS=OFF \ | ||
-DENABLE_TESTING=OFF | ||
|
||
VERBOSE=1 make -j${MASON_CONCURRENCY} | ||
make install | ||
} | ||
|
||
function mason_cflags { | ||
echo "-isystem ${MASON_PREFIX}/include" | ||
} | ||
|
||
function mason_ldflags { | ||
echo "-L${MASON_PREFIX}/lib -laws-cpp-sdk-core -laws-c-event-stream -laws-c-common -laws-checksums" | ||
} | ||
|
||
function mason_static_libs { | ||
echo "${MASON_PREFIX}/${MASON_LIB_FILE} ${MASON_PREFIX}/lib/libaws-c-event-stream.a ${MASON_PREFIX}/lib/libaws-c-common.a ${MASON_PREFIX}/lib/libaws-checksums.a" | ||
} | ||
|
||
function mason_clean { | ||
make clean | ||
} | ||
|
||
mason_run "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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=11.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 | ||
} |
Oops, something went wrong.