Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 5.6k
Migrate to zlib-ng, part 2: consume it in runtime#102403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
fb1d1b2e19dc0f88c2ac44400116b96f8895737007b578594a4ab08c871a5cd9ab7ab076a47b5e0bbfcbf4a280240c43b603de95ba1fd889ccbdbca523577baa4cc34a5a7565a5d183515e4d7a32d4d15c0e7fa5e840a5d07b9c981e747466837be21643a1fa6d84cc9c173495399b6f24ebaba13aeb0ff0e60d9c5f6798e073b206e9a7c6417ea9fFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -46,6 +46,7 @@ The .NET Foundation licenses this file to you under the MIT license. | ||
| <NativeLibrary Condition="'$(_targetArchitecture)' == 'x64'" Include="$(IlcSdkPath)$(VxSortSupportName)$(LibrarySuffix)" /> | ||
| <NativeLibrary Condition="'$(IlcMultiModule)' == 'true'" Include="$(SharedLibrary)" /> | ||
| <NativeLibrary Include="$(IlcSdkPath)$(StandaloneGCSupportName)$(LibrarySuffix)" /> | ||
| <NativeLibrary Include="$(IlcSdkPath)zlibstatic$(LibFileExt)" /> | ||
carlossanlop marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -249,7 +249,6 @@ elseif(CLR_CMAKE_HOST_OS STREQUAL "emscripten") | ||
| set(DISABLE_SHARED_LIBS 1) | ||
| # sys/random.h exists, but its not found | ||
| set(HAVE_SYS_RANDOM_H 1) | ||
| set(INTERNAL_ZLIB 1) | ||
| elseif(CLR_CMAKE_HOST_OS STREQUAL "wasi") | ||
| set(HOST_WASI 1) | ||
| add_definitions(-D_WASI_EMULATED_PROCESS_CLOCKS -D_WASI_EMULATED_SIGNAL -D_WASI_EMULATED_MMAN -DHOST_WASI) | ||
| @@ -261,7 +260,6 @@ elseif(CLR_CMAKE_HOST_OS STREQUAL "wasi") | ||
| add_compile_options(-Wno-unused-but-set-variable) | ||
| set(ENABLE_PERFTRACING 0) | ||
| set(DISABLE_SHARED_LIBS 1) | ||
| set(INTERNAL_ZLIB 1) | ||
carlossanlop marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| set(DISABLE_EXECUTABLES 1) | ||
| set(STATIC_COMPONENTS 1) | ||
| elseif(CLR_CMAKE_HOST_OS STREQUAL "windows") | ||
| @@ -270,7 +268,6 @@ elseif(CLR_CMAKE_HOST_OS STREQUAL "windows") | ||
| set(HOST_NO_SYMLINKS 1) | ||
| set(MONO_KEYWORD_THREAD "__declspec (thread)") | ||
| set(MONO_ZERO_LEN_ARRAY 1) | ||
| set(INTERNAL_ZLIB 1) | ||
| set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") # statically link VC runtime library | ||
| add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/W4>) # set warning level 4 | ||
| add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/WX>) # treat warnings as errors | ||
| @@ -511,16 +508,15 @@ if ((HOST_MACCAT AND HOST_ARM64) OR (TARGET_MACCAT AND TARGET_ARM64)) | ||
| set(TARGET_APPLE_MOBILE 1) | ||
| endif() | ||
| # Decide if we need zlib, and if so whether we want the system zlib or the in-tree copy. | ||
| # Decide if we need zlib-ng. | ||
| if(NOT DISABLE_EMBEDDED_PDB OR NOT DISABLE_LOG_PROFILER_GZ) | ||
| if(INTERNAL_ZLIB) | ||
| # defines ZLIB_SOURCES | ||
| include(${CLR_SRC_NATIVE_DIR}/external/zlib.cmake) | ||
| else() | ||
| # if we're not on a platform where we use the in-tree zlib, require system zlib | ||
| if (CLR_CMAKE_USE_SYSTEM_ZLIB) | ||
| # if we're not on a platform where we use the in-tree zlib-ng, require system zlib | ||
| include(${CLR_SRC_NATIVE_DIR}/libs/System.IO.Compression.Native/extra_libs.cmake) | ||
| set(Z_LIBS) | ||
| append_extra_compression_libs(Z_LIBS) | ||
| else() | ||
| include(${CLR_SRC_NATIVE_DIR}/external/zlib-ng.cmake) | ||
| endif() | ||
| endif() | ||
| @@ -664,12 +660,17 @@ if(LLVM_PREFIX) | ||
| endif() | ||
| set(llvm_includedir "${LLVM_PREFIX}/include") | ||
| set(llvm_system_libs "") | ||
| if(HOST_LINUX) | ||
| # llvm-config --system-libs | ||
| set(llvm_system_libs ${MONO_cxx_lib} "-lz" "-lrt" "-ldl" "-lpthread" "-lm") | ||
| list(APPEND llvm_system_libs ${MONO_cxx_lib} "-lrt" "-ldl" "-lpthread" "-lm") | ||
| elseif(HOST_OSX) | ||
| # llvm-config --system-libs | ||
| set(llvm_system_libs "-lz" "-lm") | ||
| list(APPEND llvm_system_libs "-lm") | ||
| endif() | ||
| if (CLR_CMAKE_USE_SYSTEM_ZLIB AND (HOST_LINUX OR HOST_OSX)) | ||
| list(APPEND llvm_system_libs "-lz") | ||
| endif() | ||
| # llvm-config --libs analysis core bitwriter mcjit orcjit | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -39,7 +39,16 @@ if(ENABLE_PERFTRACING) | ||
| set(CMAKE_SKIP_RPATH 1) | ||
| add_executable(ep-test ${EVENTPIPE_TEST_SOURCES} ${EVENTPIPE_TEST_HEADERS}) | ||
| target_sources(ep-test PRIVATE "${mono-components-objects}") | ||
| target_link_libraries(ep-test PRIVATE eglib_api monosgen-static ${OS_LIBS} ${LLVM_LIBS} ${Z_LIBS} monoapi) | ||
carlossanlop marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| set(EPTEST_LINKABLE_LIBS "") | ||
| list(APPEND EPTEST_LINKABLE_LIBS eglib_api monosgen-static ${OS_LIBS} ${LLVM_LIBS} monoapi) | ||
| if (CLR_CMAKE_USE_SYSTEM_ZLIB) | ||
| list(APPEND EPTEST_LINKABLE_LIBS ${EPTEST_LINKABLE_LIBS} ${Z_LIBS}) | ||
| else() | ||
| list(APPEND EPTEST_LINKABLE_LIBS ${EPTEST_LINKABLE_LIBS} zlib) | ||
| endif() | ||
| target_link_libraries(ep-test PRIVATE ${EPTEST_LINKABLE_LIBS}) | ||
| install_with_stripped_symbols(ep-test TARGETS bin) | ||
| else(ENABLE_EVENTPIPE_TEST AND STATIC_COMPONENTS AND (NOT DISABLE_COMPONENTS) AND (NOT DISABLE_LIBS) AND (NOT DISABLE_EXECUTABLES)) | ||
| message(VERBOSE "Skip building native EventPipe library test runner.") | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -30,12 +30,8 @@ | ||
| #include <mono/utils/mono-logger-internals.h> | ||
| #ifndef DISABLE_EMBEDDED_PDB | ||
| #ifdef INTERNAL_ZLIB | ||
| #include <external/zlib/zlib.h> | ||
| #else | ||
| #include <zlib.h> | ||
carlossanlop marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| #endif | ||
| #endif | ||
| #endif // DISABLE_EMBEDDED_PDB | ||
| #include "debug-mono-ppdb.h" | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.