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 0670d21
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion 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/13.0.1/lib/linux/
fi
if [[ ${target} == *mingw32* ]]; then
export CCACHE_DISABLE=true
fi
Expand Down Expand Up @@ -494,6 +499,7 @@ function configure_build(ARGS, version; experimental_platforms=false, assert=fal
# TODO: LibXML2
dependencies = Dependency[
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 0670d21

Please sign in to comment.