xmos / xcommon_cmake

6 stars 5 forks source link

pca.d file generated by xpca contains nonsense #182

Open xhuw opened 1 month ago

xhuw commented 1 month ago

Run the test test_cmake[pca_libs] and comment out the lines that delete the build dir. look in the file .build/pca.d which is supposed to be a valid depfile mapping targets to dependencies. It contains nonsense. On my machine it looks like this:

/home/huw/projects/xcommon_cmake/tests/pca_libs/app_pca_libs/.build//home/huw/projects/xcommon_cmake/tests/pca_libs/_l_mod0/_l_mod0/src/mod0.xc.o:
/home/huw/projects/xcommon_cmake/tests/pca_libs/app_pca_libs/.build//home/huw/projects/xcommon_cmake/tests/pca_libs/_l_mod1/_l_mod1/src/mod1.xc.o:
/home/huw/projects/xcommon_cmake/tests/pca_libs/app_pca_libs/.build//home/huw/projects/xcommon_cmake/tests/pca_libs/app_pca_libs/src/pca_libs.xc.o:

Those paths are invalid and it's also specifying no dependencies.

what are the consequences of this? This is unproven, but I expect that partial builds will not be completed properly when PCA is enabled, leading to invalid binaries.

Another consequence is that we can't use ninja because the cmake depfile converter for ninja in cmake 3.21 sees it as an invalid depfile.