-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
remove -Zi from MSVC compiler options #3291
Conversation
This is incompatible with compiler caches such as sccache and clcache. If a project including Google Test specifies /Z7 instead, building fails with: sccache C:\PROGRA~2\MICROS~1\2019\ENTERP~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\cl.exe /nologo /TP -D__SSE2__ -D__SSE__ -I..\lib\googletest-1.10.x\googlemock\include -I..\lib\googletest-1.10.x\googlemock -I..\lib\googletest-1.10.x\googletest\include -I..\lib\googletest-1.10.x\googletest /DWIN32 /D_WINDOWS /W4 /GR /MD /Z7 /O2 /Ob1 /DNDEBUG -GS -W4 -WX -wd4251 -wd4275 -nologo -J -Zi -D_UNICODE -DUNICODE -DWIN32 -D_WIN32 -DSTRICT -DWIN32_LEAN_AND_MEAN -wd4702 -DGTEST_HAS_PTHREAD=0 -EHsc -D_HAS_EXCEPTIONS=1 /Gy /showIncludes /Folib\googletest-1.10.x\googlemock\CMakeFiles\gmock_main.dir\src\gmock-all.cc.obj /Fdbin\gmock_main.pdb /FS -c ..\lib\googletest-1.10.x\googlemock\src\gmock-all.cc FAILED: lib/googletest-1.10.x/googlemock/CMakeFiles/gmock_main.dir/src/gmock-all.cc.obj ..\lib\googletest-1.10.x\googletest\src\gtest-all.cc: fatal error C1041: cannot open program database 'D:\a\mixxx\mixxx\build\bin\gmock_main.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS cl : Command line warning D9025 : overriding '/Z7' with '/Zi'
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
That broke sccache. google/googletest#3291
That broke sccache. google/googletest#3291
That broke sccache. google/googletest#3291
That broke sccache. google/googletest#3291
For most Windows people it may look weird why not use default -Zi and use -Z7 rather. Disclaimer: |
I don't think a project designed to be built into other projects should be setting any choice of how the debugging info is handled. |
For me the pros and cons of |
Thank you for merging. |
With sccache enabled, we cannot use `/Zi` as it causes weird interactions for `mspdbsrv` (c.f. google/googletest#3291).
With sccache enabled, we cannot use `/Zi` as it causes weird interactions for `mspdbsrv` (c.f. google/googletest#3291).
This is incompatible with compiler caches such as sccache and
clcache. If a project including Google Test specifies /Z7 instead,
building fails with: