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

Ninja deps fails to handle files ending with . or whitespace. #1773

Open
jlonnberg opened this issue May 7, 2020 · 1 comment
Open

Ninja deps fails to handle files ending with . or whitespace. #1773

jlonnberg opened this issue May 7, 2020 · 1 comment
Labels

Comments

@jlonnberg
Copy link

This issue is visible for windows when using gcc or clang as compiler. A sourcefile like (notice the trailing dot at the end of the include")

#include "funcFile.h."
int main(){
return 1;
}

will produce a deps file which can't be handled by ninja when running with a stat cache. The stat system will on windows automatically remove the trailing . when stating the directory containing the header. When comparing the file from the deps, it will search the cache for "funcFile.h." rather than "funcFile.h" which will force a rebuild each time.

Note that the compilation works out ok, without any warnings. Running ninja with nostatcache solves the problem as the windows api:s automatically removes any trailing . or whitespace before stating the file.

See https://support.microsoft.com/en-za/help/2829981/support-for-whitespace-characters-in-file-and-folder-names-for-windows for windows doc.

Plausible solution would be to drop any . or whitespace as last character before using the stat-cache.

Comments and opinions are much welcome!

@jhasse jhasse added the bug label May 8, 2020
@jonesmz

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants