Skip to content

Commit

Permalink
[Runner] Fix MSAN C++ compiler with LLVM 13 (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano authored Jan 27, 2024
1 parent 5d6d8d6 commit a4ef056
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Runner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,16 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
])
end
end
if Sys.islinux(p) && !isnothing(gcc_version) && !isnothing(clang_version) && (clang_version >= v"16")
append!(flags, ["--gcc-install-dir=/opt/$(aatriplet(p))/lib/gcc/$(aatriplet(p))/$(gcc_version)"])
if Sys.islinux(p)
# Find GCC toolchain
gcc_toolchain_flag = if !isnothing(gcc_version) && !isnothing(clang_version) && (clang_version >= v"16")
"--gcc-install-dir=/opt/$(aatriplet(p))/lib/gcc/$(aatriplet(p))/$(gcc_version)"
else
# This helps MSAN C++ compiler finding the target toolchain, rather than the host one:
# <https://github.com/JuliaPackaging/Yggdrasil/pull/7872#issuecomment-1913141689>.
"--gcc-toolchain=/opt/$(aatriplet(p))"
end
append!(flags, [gcc_toolchain_flag])
end
if Sys.iswindows(p)
windows_cflags!(p, flags)
Expand Down

0 comments on commit a4ef056

Please sign in to comment.