Skip to content

Commit

Permalink
[LLVM] Install MSAN runtime when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano committed Jan 3, 2023
1 parent 3c6f161 commit 3ff3a60
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions L/LLVM/common.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# LLVMBuilder -- reliable LLVM builds all the time.
using BinaryBuilder, Pkg, LibGit2
using BinaryBuilderBase: get_addable_spec
using BinaryBuilderBase: get_addable_spec, sanitize

# Everybody is just going to use the same set of platforms

Expand All @@ -21,6 +21,11 @@ const buildscript = raw"""
# We want to exit the program if errors occur.
set -o errexit
if [[ ${bb_full_target} == *-sanitize+memory* ]]; then
# Install msan runtime (for clang)
cp -rL ${prefix}/lib/linux/* /opt/x86_64-linux-musl/lib/clang/*/lib/linux/
fi
if [[ ${target} == *mingw32* ]]; then
export CCACHE_DISABLE=true
fi
Expand Down Expand Up @@ -492,8 +497,9 @@ function configure_build(ARGS, version; experimental_platforms=false, assert=fal
end
# Dependencies that must be installed before this package can be built
# TODO: LibXML2
dependencies = Dependency[
dependencies = [
Dependency("Zlib_jll"), # for LLD&LTO
BuildDependency("LLVMCompilerRT_jll"; platforms=filter(p -> sanitize(p)=="memory", platforms)),
]
return name, custom_version, sources, config * buildscript, platforms, products, dependencies
end
Expand Down

0 comments on commit 3ff3a60

Please sign in to comment.