Uh oh!
There was an error while loading. Please reload this page.
[mono] Reorganize zlib dependency logic - #63365
Conversation
In particular this re-enables embedded PDB support on iOS and Android
Uh oh!
There was an error while loading. Please reload this page.
lambdageek
commented
Jan 4, 2022
/azp run runtime-manual |
|
Azure Pipelines successfully started running 1 pipeline(s). |
lambdageek
commented
Jan 5, 2022
See #63365 (comment) I think we can do better for net7: have explicit options for enable/disable Embedded PDB support and compressed log profiler output, and use those to decide whether zlib is required or not, and if it is required, whether we should depend on the system zlib, or the in-tree copy. |
Instead of deciding whether features are enabled based on the presence or absense of zlib, add switches to control features (embedded PDB support, and compressed log profiler output) and based on that require zlib. On some platforms we use the in-tree copy of zlib from src/native/external/zlib, otherwise we want to link against the system zlib. Previously, if zlib was missing the build would quietly succeed, but the feature support would be missing. Now, if the feature isn't disabled but zlib is missing, we fail the build. If both features are disabled, don't depend on zlib at all.
bfb11b7 to
2f7c714CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| #cmakedefine DISABLE_QCALLS 1 | ||
| /* Embedded PDB support disabled */ | ||
| #cmakedefine DISABLE_EMBEDDED_PDB 1 |
There was a problem hiding this comment.
nit: when DISABLE_EMBEDDED_PDB is defined in cmake config, this produces:
#defineDISABLE_EMBEDDED_PDB 1in coreclr, src/native etc., we use these two variants:
#cmakedefine TOKEN
#cmakedefine01 TOKENwhen TOKEN is defined in cmake config, it generates:
#defineTOKEN// usage: #ifdef TOKEN#defineTOKEN 1 // usage: #if TOKENand when undefined, produces:
// nothing for the first line#defineTOKEN 0 // usage: #if TOKEN- reverse if() logic to avoid negation - use cmakedefine without a value in config.h.in, same as CoreCLR
In particular this re-enables embedded PDB support on iOS and Android The corresponding PR for main is #63365
Instead of deciding whether features are enabled based on the presence or absence of zlib, add switches to control features (embedded PDB support, and compressed log profiler output) and based on that require zlib.
On some platforms we use the in-tree copy of zlib from src/native/external/zlib, otherwise we want to link against the system zlib.
Previously, if zlib was missing the build would quietly succeed, but the feature support would be missing. Now, if the feature isn't disabled but zlib is missing, we fail the build.
If both features are disabled, don't depend on zlib at all.
In particular this re-enables embedded PDB support on iOS and Android
The corresponding release/6.0-maui PR is #63359 and is more conservative - it just duplicates the mono/mono HAVE_SYS_ZLIB check. In this PR, we get rid of
HAVE_SYS_ZLIBentirely.