Skip to content

Commit

Permalink
Add Msan build to GMP (#5356)
Browse files Browse the repository at this point in the history
* Add Msan build to GMP

* Comment to trigger build

* Add and copy CompilerRT libs

* Missing bracket

* Type error

* Update G/GMP/common.jl

Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
  • Loading branch information
gbaraldi and giordano committed Aug 24, 2022
1 parent c32936f commit 2086725
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions G/GMP/GMP@6.2.1/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ include("../common.jl")
build_tarballs(ARGS, configure(version)...;
preferred_gcc_version=v"6", julia_compat="1.7")

# Trigger build!
10 changes: 7 additions & 3 deletions G/GMP/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ if [[ ${proc_family} == intel ]]; then
flags+=(--enable-fat)
fi
if [[ ${bb_full_target} == *-sanitize+memory* ]]; then
# Install msan runtime (for clang)
cp -rL ${libdir}/linux/* /opt/x86_64-linux-musl/lib/clang/*/lib/linux/
fi
autoreconf
./configure --prefix=$prefix --build=${MACHTYPE} --host=${target} ${flags[@]}
Expand All @@ -52,15 +56,15 @@ install_license COPYING*

# We enable experimental platforms as this is a core Julia dependency
platforms = expand_cxxstring_abis(supported_platforms(;experimental=true))

# The products that we will ensure are always built
push!(platforms, Platform("x86_64", "linux"; sanitize="memory"))
products = [
LibraryProduct("libgmp", :libgmp),
LibraryProduct("libgmpxx", :libgmpxx),
]

# Dependencies that must be installed before this package can be built
dependencies = Dependency[
dependencies = [
BuildDependency("LLVMCompilerRT_jll",platforms=[Platform("x86_64", "linux"; sanitize="memory")]),
]

return name, version, sources, script, platforms, products, dependencies
Expand Down

0 comments on commit 2086725

Please sign in to comment.