I think that if GCC isn’t going to do it, build systems are going to have to move the code anyway,
It sounds like GCC is the golden rule, which is more or less odd. The number of build systems are much more than the number of compilers. I think it is arbitrary to say they won’t support it. Actually, we’ve support it in our downstream build systems. It is pretty beneficial for the sandboxed build. We’d like to contribute it if the preconditions are met. And I believe it will be helpful for distributed build too.
I guess I only see this being the case for custom build systems, because if GCC or MSVC doesn’t do this too, no one is going ot use this feature.
I can’t agree with this. I know some projects are using clang only. I believe such projects won’t be too rare.
so this ends up being a rarely/never used functionality that we have to test and maintain.
In another perspective, if this is really a rarely or never used functionality, we should remove the functionality directly. But it is not the case. We’ve already used it. And I think Google are using it too. Is it the case?@dblaikie @ilya @zygoloid
Which github issue do you mean?
It is listed in the first paragraph of the post.
That said, I would probably wish that we spend time fixing THAT requirement, or finding a valid fallback in those situations for when the file doesn’t exist.
Technically agreed. But given it is too fundamental, I don’t know how to do it cleanly. As I said in the post, if we choose this way forward, I do think it is the same choice to stuck us in this direction.
More concretely, some issues are in ASTReader. I’ve fixed some of them. And some are in the source manager, (I found this in downstream):
I don’t want to touch source manager unless we have to:
This seems actively harmful FWIW. “requiring” the source files to be present(either by flag or existence) without a good mental model /explanation for devs seems problematic.
It is not the case in my experience. All the users I know (including either build system authors and end users), they either accept that all the input files need to be present or require ways to workaround it (the topic we’re discussing.)
CC some build system authors: @boris-kolpackov @ben.boeckel @Arthapz @aaronmondal