llvm_5: patch sanitizers to enable w/musl
https://gitweb.gentoo.org/proj/musl.git/plain/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-5.0.0-musl-patches.patch
This commit is contained in:
@@ -77,6 +77,12 @@ in stdenv.mkDerivation (rec {
|
||||
substituteInPlace unittests/Support/CMakeLists.txt \
|
||||
--replace "add_subdirectory(DynamicLibrary)" ""
|
||||
rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
|
||||
patch -p1 -i ${./sanitizers-nongnu.patch} -d projects/compiler-rt
|
||||
sed -i projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc \
|
||||
-e '1i#define _LINUX_SYSINFO_H'
|
||||
substituteInPlace projects/compiler-rt/lib/interception/interception_linux.h \
|
||||
--replace '!defined(__ANDROID__)' \
|
||||
'!defined(__ANDROID__) && !SANITIZER_NONGNU'
|
||||
'';
|
||||
|
||||
# hacky fix: created binaries need to be run before installation
|
||||
@@ -112,9 +118,6 @@ in stdenv.mkDerivation (rec {
|
||||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
|
||||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}"
|
||||
"-DTARGET_TRIPLE=${stdenv.targetPlatform.config}"
|
||||
|
||||
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
||||
"-DCOMPILER_RT_BUILD_XRAY=OFF"
|
||||
];
|
||||
|
||||
postBuild = ''
|
||||
|
||||
Reference in New Issue
Block a user