You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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!
The text was updated successfully, but these errors were encountered: