-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[mono] Reorganize zlib dependency logic #63365
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
Conversation
In particular this re-enables embedded PDB support on iOS and Android
|
/azp run runtime-manual |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
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
2f7c714
Compare
src/mono/cmake/config.h.in
Outdated
| #cmakedefine DISABLE_QCALLS 1 | ||
|
|
||
| /* Embedded PDB support disabled */ | ||
| #cmakedefine DISABLE_EMBEDDED_PDB 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: when DISABLE_EMBEDDED_PDB is defined in cmake config, this produces:
#define DISABLE_EMBEDDED_PDB 1in coreclr, src/native etc., we use these two variants:
#cmakedefine TOKEN
#cmakedefine01 TOKENwhen TOKEN is defined in cmake config, it generates:
#define TOKEN // usage: #ifdef TOKEN
#define TOKEN 1 // usage: #if TOKENand when undefined, produces:
// nothing for the first line
#define TOKEN 0 // usage: #if TOKENCo-authored-by: Adeel Mujahid <[email protected]>
- 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.