blob: a6a90d364036f996a64b881429b434eb804f3b69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
From a4751125c7303e060e21eca48b150fb7368330fc Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 4 Jan 2020 01:00:06 -0800
Subject: [PATCH] llvm: Add -lz to linker cmdline if enabled
cmake's detection mechanism confuses libz.so during cross build and ends
up linking with libz from build host which could be a different
architecture and fail link
see
https://reviews.llvm.org/D70764#1803559
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
llvm/lib/Support/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt
index 5c656164e77..60316a59fbd 100644
--- a/llvm/lib/Support/CMakeLists.txt
+++ b/llvm/lib/Support/CMakeLists.txt
@@ -1,5 +1,5 @@
if(LLVM_ENABLE_ZLIB)
- set(imported_libs ZLIB::ZLIB)
+ set(system_libs z)
endif()
if( MSVC OR MINGW )
|