diff options
Diffstat (limited to 'main/llvm/compiler-rt-0002-musl-no-sanitizers.patch')
-rw-r--r-- | main/llvm/compiler-rt-0002-musl-no-sanitizers.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/main/llvm/compiler-rt-0002-musl-no-sanitizers.patch b/main/llvm/compiler-rt-0002-musl-no-sanitizers.patch new file mode 100644 index 0000000000..433895a3b8 --- /dev/null +++ b/main/llvm/compiler-rt-0002-musl-no-sanitizers.patch @@ -0,0 +1,61 @@ +From c6a6b4cd6b6516aa01595292086d53f9e47ca599 Mon Sep 17 00:00:00 2001 +From: Travis Tilley <ttilley@gmail.com> +Date: Sat, 9 May 2015 04:17:45 -0400 +Subject: [PATCH 2/2] dont build sanitizers on musl. they currently require too + many extensions to compile. + +--- + cmake/config-ix.cmake | 4 +++- + lib/Makefile.mk | 15 ++++++++------- + 2 files changed, 11 insertions(+), 8 deletions(-) + +diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake +index f6d48b3..26b6d8e 100644 +--- a/cmake/config-ix.cmake ++++ b/cmake/config-ix.cmake +@@ -186,13 +186,15 @@ filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386 i686 arm mips mips64 + filter_available_targets(TSAN_SUPPORTED_ARCH x86_64) + filter_available_targets(UBSAN_SUPPORTED_ARCH x86_64 i386 i686 arm aarch64 mips mipsel mips64 mips64el) + ++string(REGEX MATCH "musl[^-]*$" LLVM_ENV_MUSL ${LLVM_HOST_TRIPLE}) ++ + if(ANDROID) + set(OS_NAME "Android") + else() + set(OS_NAME "${CMAKE_SYSTEM_NAME}") + endif() + +-if (SANITIZER_COMMON_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND ++if (SANITIZER_COMMON_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND NOT LLVM_ENV_MUSL AND + (OS_NAME MATCHES "Android|Darwin|Linux|FreeBSD" OR + (OS_NAME MATCHES "Windows" AND MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 4))) + set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE) +diff --git a/lib/Makefile.mk b/lib/Makefile.mk +index ed9690d..28e17d9 100644 +--- a/lib/Makefile.mk ++++ b/lib/Makefile.mk +@@ -10,13 +10,14 @@ + SubDirs := + + # Add submodules. +-SubDirs += asan ++#SubDirs += asan + SubDirs += builtins +-SubDirs += dfsan ++#SubDirs += dfsan + SubDirs += interception +-SubDirs += lsan +-SubDirs += msan ++#SubDirs += lsan ++#SubDirs += msan + SubDirs += profile +-SubDirs += sanitizer_common +-SubDirs += tsan +-SubDirs += ubsan ++#SubDirs += sanitizer_common ++#SubDirs += tsan ++#SubDirs += ubsan ++ +-- +2.1.4 + |