zig: fix build
It looks like https://github.com/NixOS/nixpkgs/pull/88248 broke the build for zig. The error you get when building zig on the current master branch is: ``` Scanning dependencies of target zig_build_libstage2 : CommandLine Error: Option 'polly' registered more than once! LLVM ERROR: inconsistency in registered CommandLine options make[2]: *** [CMakeFiles/zig_build_libstage2.dir/build.make:77: CMakeFiles/zig_build_libstage2] Error 1 make[1]: *** [CMakeFiles/Makefile2:252: CMakeFiles/zig_build_libstage2.dir/all] Error 2 make: *** [Makefile:150: all] Error 2 ``` The patch that added polly into some build args was likely necessary only for LLVM 10.0.0 and when that was updated to 10.0.1 it stopped working or became unnecessary. With this patch removed, zig builds fine and passes the tests.
This commit is contained in:
parent
e347b4bbb3
commit
d51340f27f
@ -20,13 +20,6 @@ llvmPackages.stdenv.mkDerivation rec {
|
||||
zlib
|
||||
];
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./llvm10_polly.patch;
|
||||
llvm_extras = "-Wl,${llvmPackages.llvm}/lib/LLVMPolly.so";
|
||||
})
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
export HOME=$TMPDIR;
|
||||
'';
|
||||
|
@ -1,10 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 97608cddf..e451c0711 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -369,4 +369,5 @@ target_link_libraries(zig_cpp LINK_PUBLIC
|
||||
${CLANG_LIBRARIES}
|
||||
${LLD_LIBRARIES}
|
||||
${LLVM_LIBRARIES}
|
||||
+ @llvm_extras@
|
||||
)
|
Loading…
Reference in New Issue
Block a user