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

sccache + clang-cl MSVC broken since PR1730 #1953

Closed
omjavaid opened this issue Nov 13, 2023 · 15 comments
Closed

sccache + clang-cl MSVC broken since PR1730 #1953

omjavaid opened this issue Nov 13, 2023 · 15 comments

Comments

@omjavaid
Copy link

omjavaid commented Nov 13, 2023

clang-cl fails to compile with sccache appended on latests version 0.5.3. The problem is exactly the same as described in #1725. The problem seems to be fixed for MSVC cl but not for clang-cl. Note: This problem only appeared for clang-cl before the fix.

@sylvestre
Copy link
Collaborator

sorry but could you please share error messages?

@omjavaid
Copy link
Author

sccache C:\PROGRA~1\LLVM\bin\clang-cl.exe /nologo -TP -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:\work2\llvm-dev\build\lib\Support -IC:\work2\llvm-dev\llvm-project\llvm\lib\Support -IC:\work2\llvm-dev\build\include -IC:\work2\llvm-dev\llvm-project\llvm\include /DWIN32 /D_WINDOWS /Zc:inline /Zc:__cplusplus /Oi /Brepro /bigobj /permissive- /W4 -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported /Gw /O2 /Ob2 -MD -UNDEBUG -std:c++17 /EHs-c- /GR- /showIncludes /Folib\Support\CMakeFiles\LLVMSupport.dir\AMDGPUMetadata.cpp.obj /Fdlib\Support\CMakeFiles\LLVMSupport.dir\LLVMSupport.pdb -c -- C:\work2\llvm-dev\llvm-project\llvm\lib\Support\AMDGPUMetadata.cpp clang-cl: error: no such file or directory: '/wd4668' ninja: build stopped: subcommand failed.

@sylvestre
Copy link
Collaborator

@Alexei-Barnes you had the same issue, right ? :)

@omjavaid
Copy link
Author

omjavaid commented Nov 13, 2023

@sylvestre Before the fix for #1725 was merged sccache used to work for clang-cl but not for cl.exe. Now sccache gives this message with clang-cl while cl works fine. There needs to be a minor tweak in code i believe but as I am not aware of the code base someone with more knowledge should be able to fix this issue.

@sylvestre
Copy link
Collaborator

@omjavaid which fix are you talking about?
#1725 (comment)
suggested that it is a compiler bug, not sccache

@omjavaid
Copy link
Author

I think this PR 1730 #1730 merged a workaround for this issue for cl.exe

@sylvestre
Copy link
Collaborator

ok, thanks
seems that the workaround is still there and still tested by the CI:
https://github.com/mozilla/sccache/actions/runs/6825714731/job/18564154401

@omjavaid
Copy link
Author

But same workaround has broken "clang-cl" which used to work before it was merged.

@sylvestre
Copy link
Collaborator

@omjavaid does it work if you revert the PR ? thanks

@omjavaid
Copy link
Author

I have not built sccache from source to test this. I just used one earlier release which appeared to be 0.5.1 to make things work for me.

@glandium
Copy link
Collaborator

You're mentioning versions 0.5.x, have you tried version 0.7.1?

@omjavaid
Copy link
Author

@glandium yes I have tried 0.7.1 and then moved back to 0.5.1 because this was the last release that worked with clang-cl + MSVC.

@sylvestre
Copy link
Collaborator

@omjavaid this is a bit confusing
you opened the ticket mentioning 0.5.3

This error message:
#1953 (comment)
is produced with which version?

@omjavaid
Copy link
Author

The offending commit is #1730 which was first merged in version 0.5.2. The problem persists since then till the latest 0.7.1 version.

@glandium
Copy link
Collaborator

glandium commented Nov 14, 2023

Oh, this is a dupe of #1843

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

No branches or pull requests

3 participants