llvm-mos-sdk icon indicating copy to clipboard operation
llvm-mos-sdk copied to clipboard

Modified clang.cfg files don't get picked up by the build system

Open davidgiven opened this issue 3 years ago • 1 comments

If I modify a clang.cfg file, then try to do a build/install, the modified file isn't installed. This can lead to some very strange results!

$ cat mos-platform/cpm65/clang.cfg 
-D__CPM65__
-Wl,-emit-relocs
-fpost-link-tool=elftocpm65

$ cat /opt/pkg/llvm-mos/bin/mos-cpm65.cfg
...skipped...
-D__CPM65__
-Wl,-emit-relocs
-fpost-link-tool=elftocpm65
...skipped

$ echo "test" >> mos-platform/cpm65/clang.cfg 
$ ninja -C build install
...skipped...

$ cat /opt/pkg/llvm-mos/bin/mos-cpm65.cfg
...skipped...
-D__CPM65__
-Wl,-emit-relocs
-fpost-link-tool=elftocpm65
...skipped...

This is using cmake configured like this:

cd build && cmake -G "Ninja" -DCMAKE_INSTALL_PREFIX=/opt/pkg/llvm-mos ..

I'm using more-or-less head of repo (github says I'm 17 commits behind, but none of those look relevant).

davidgiven avatar Oct 07 '22 22:10 davidgiven

I think this is a known issue with our CMake setup, but I'm not quite enough of a CMake wizard to solve it. We're already stretching it pretty thin; we're doing what the community calls a "superbuild", since we're making binaries for a load of different target systems, which is difficult to get right.

I'll leave this open though, since there didn't seem to be a tracking issue already. This also may not be what I'm thinking of, or it may be easier to solve than I think when I get around to it next.

mysterymath avatar Oct 10 '22 01:10 mysterymath