From 68351290ad701dd655311a9fb557266993362d00 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Sat, 23 Jun 2018 11:51:22 -0500 Subject: llvm_38: musl patches + options Same as those added to llvm_39 a few commits ago. --- pkgs/development/compilers/llvm/3.8/llvm.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'pkgs/development/compilers') diff --git a/pkgs/development/compilers/llvm/3.8/llvm.nix b/pkgs/development/compilers/llvm/3.8/llvm.nix index 30d40a84b4e7..b847a67e7e3f 100644 --- a/pkgs/development/compilers/llvm/3.8/llvm.nix +++ b/pkgs/development/compilers/llvm/3.8/llvm.nix @@ -36,8 +36,12 @@ in stdenv.mkDerivation rec { # Fix a segfault in llc # See http://lists.llvm.org/pipermail/llvm-dev/2016-October/106500.html - patches = [ ./D17533-1.patch ] ++ - stdenv.lib.optionals (!stdenv.isDarwin) [./fix-llvm-config.patch]; + patches = [ ./D17533-1.patch ] + ++ stdenv.lib.optional (!stdenv.isDarwin) ./fix-llvm-config.patch + ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [ + ../TLI-musl.patch + ../dynamiclibrary-musl.patch + ]; # hacky fix: New LLVM releases require a newer macOS SDK than # 10.9. This is a temporary measure until nixpkgs darwin support is @@ -81,6 +85,14 @@ in stdenv.mkDerivation rec { ++ stdenv.lib.optionals ( isDarwin) [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" + ] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [ + "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" + "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}" + "-DTARGET_TRIPLE=${stdenv.targetPlatform.config}" + # Not yet supported + "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" + "-DCOMPILER_RT_BUILD_XRAY=OFF" + ]; postBuild = '' -- cgit 1.4.1