Re: GNOME Modulesets migrating to BuildStream - clang completion in text editor

On 11/23/2017 10:16 PM, Tristan Van Berkom wrote:
Philip's reply is also a possibility but I would prefer recommending
something via BuildStream, mostly because you want to use exactly the
header files that you need for your target environment, but also
because there is no guarantee that a flatpak SDK will even have headers
for the dependencies you might want to use.

In Builder, we build/configure the project in the target runtime (so flatpak/jhbuild/host/etc) and then have an interface to extract CFLAGS/etc from the build system. Then we have to translate paths to the OSTree deploy-dir or staging directory.

So if we see /app/include/foo/bar.h, that will get re-rooted to your build's staging dir. /usr/include/foo/bar.h gets translated into the Sdk's deploy-dir/files/include/foo/bar.h. (And so forth)

Then when passing that data along to libclang for diagnostics/completion, we give it -I/translated/paths rather than the original which came from the build system inside the container.

This process is rather trivial compared to finding the proper .so's containing debug symbols/DWARF data for debugging/profiling...

-- Christian

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]