Skip to content
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

README: document that sccache is incompatible with /Zi with MSVC #963

Merged
merged 2 commits into from
Oct 26, 2021

Conversation

Be-ing
Copy link
Contributor

@Be-ing Be-ing commented Feb 26, 2021

This is not obvious and difficult to figure out for users not very familiar with MSVC.

README.md Outdated
@@ -108,6 +108,21 @@ To use sccache with cmake, provide the following command line arguments to cmake
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
```

To generate PDB files for debugging with MSVC, only the [`/Z7` option](https://docs.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format?view=msvc-160) works with sccache; the PDB files generated with the `/Zi` and `/ZI` options cannot be cached. Note that CMake sets `/Zi` by default, so if you use CMake, you will need something like this in your CMakeLists.txt:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is not entirely true. /Zi is supported if you also use /Fd with a different pdb name for each object file you create.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for correcting that. I'll update the documentation.

@Be-ing Be-ing requested a review from glandium May 10, 2021 00:13
@sylvestre sylvestre merged commit cc4daa9 into mozilla:master Oct 26, 2021
@Be-ing Be-ing deleted the document_z7 branch February 25, 2022 22:19
expipiplus1 added a commit to expipiplus1/miniz that referenced this pull request Nov 21, 2023
This seems like an option better set externally by the user if they desire separate debug info

Furthermore, this prevents building miniz with sccache enabled, see mozilla/sccache#963
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants