diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets index 3ff044e94d9d2a..0783ab21a46c05 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets @@ -24,7 +24,7 @@ The .NET Foundation licenses this file to you under the MIT license. lld bfd 1572864 - true + true @@ -130,13 +130,13 @@ The .NET Foundation licenses this file to you under the MIT license. - + diff --git a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt index 69d333ae53f9c5..7fa92062d8e5b0 100644 --- a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt +++ b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt @@ -184,7 +184,12 @@ else () endif () if((NOT CLR_CMAKE_USE_SYSTEM_ZLIB) AND STATIC_LIBS_ONLY) - install_static_library(zlib aotsdk nativeaot) + if (CLR_CMAKE_TARGET_UNIX) + # zlib on Unix needs to be installed in the same location as System.IO.Compression.Native so that we can then treat is as a 'z' native library. + install_static_library(zlib ${STATIC_LIB_DESTINATION} nativeaot) + else() + install_static_library(zlib aotsdk nativeaot) + endif() endif() install (TARGETS System.IO.Compression.Native-Static DESTINATION ${STATIC_LIB_DESTINATION} COMPONENT libs)