Skip to content

Commit

Permalink
[Ccache] Upgrade to v2.7.4 (#5908)
Browse files Browse the repository at this point in the history
* [Ccache] Upgrade to v2.7.4

* [CCache] Require GCC 10 because of Windows

* [Ccache] Use macOS SDK 10.15 for x86_64

* [Ccache] Add `CompilerSupportLibraries_jll` as dependency where needed
  • Loading branch information
giordano authored Nov 23, 2022
1 parent 79d4490 commit 4533b19
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions C/Ccache/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,37 @@
using BinaryBuilder, Pkg

name = "Ccache"
version = v"4.2"
upstream_version = "4.7.4"
version = VersionNumber(upstream_version)

# Collection of sources required to complete build
sources = [
ArchiveSource("https://github.com/ccache/ccache/releases/download/v$(version.major).$(version.minor)/ccache-$(version.major).$(version.minor).tar.xz",
"2f14b11888c39778c93814fc6843fc25ad60ff6ba4eeee3dff29a1bad67ba94f"),
ArchiveSource("https://github.com/ccache/ccache/releases/download/v$(upstream_version)/ccache-$(upstream_version).tar.xz",
"df0c64d15d3efaf0b4f6837dd6b1467e40eeaaa807db25ce79c3a08a46a84e36"),
ArchiveSource("https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.15.sdk.tar.xz",
"2408d07df7f324d3beea818585a6d990ba99587c218a3969f924dfcc4de93b62"),
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/ccache*
if [[ "${target}" == x86_64-apple-darwin* ]]; then
# Install a newer SDK which supports `std::filesystem`
pushd $WORKSPACE/srcdir/MacOSX10.*.sdk
rm -rf /opt/${target}/${target}/sys-root/System
cp -ra usr/* "/opt/${target}/${target}/sys-root/usr/."
cp -ra System "/opt/${target}/${target}/sys-root/."
export MACOSX_DEPLOYMENT_TARGET=10.15
popd
fi
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=${prefix} \
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
-DCMAKE_BUILD_TYPE=Release \
..
make -j${nroc}
make -j${nproc}
make install
install_license ../GPL-3.0.txt ../LGPL-3.0.txt
"""
Expand All @@ -37,7 +51,17 @@ products = [
dependencies = [
Dependency("Zlib_jll"),
Dependency("Zstd_jll"),
Dependency("CompilerSupportLibraries_jll"; platforms=filter(p -> Sys.islinux(p) || Sys.isfreebsd(p), platforms)),
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
# GCC 8 is actually required for full support of std::filesystem, but that
# doesn't work with MinGW, but then with GCC 9 we run into
# [ 19%] Built target libhiredis_static
# /tmp/cchLGcal.s: Assembler messages:
# /tmp/cchLGcal.s:3360: Error: invalid register for .seh_savexmm
# /tmp/cchLGcal.s:3362: Error: invalid register for .seh_savexmm
# (<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65782>), which brings us to
# GCC 10.
julia_compat="1.6", preferred_gcc_version=v"10")

0 comments on commit 4533b19

Please sign in to comment.