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

Compiler abstraction #956

Open
jrosdahl opened this issue Nov 2, 2021 · 0 comments
Open

Compiler abstraction #956

jrosdahl opened this issue Nov 2, 2021 · 0 comments
Labels
improvement Improvement that is not a bug fix or new feature

Comments

@jrosdahl
Copy link
Member

jrosdahl commented Nov 2, 2021

Ccache started with support for GCC and compilers that were "similar enough". During the years, more support for GCC-like compilers like Clang was added with well-placed if/else statements. Then NVCC support was added with even more ifs and elses. I've accepted the current state since both Clang and NVCC support come with reasonably extensive test suites so that it will hopefully be easy to refactor compiler support in the future without breaking stuff.

However, since there are wishes for supporting compilers that don't behave like GCC at all (e.g. MSVC in #431/#506 and Tasking in #841/#942) there is a desperate need of better code structure - the code base simply can't handle more accidental complexity. There should be an API that captures compiler specifics such as how to process arguments, how to preprocess code, how to retrieve included files (for the direct mode), etc. Compiler-specific behavior should then be put in implementations of that API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement that is not a bug fix or new feature
Projects
None yet
Development

No branches or pull requests

1 participant