Open dcharkes opened 3 months ago
Just FYI, includes
adds all files that are contained in the provided directories to dependencies. So you could just add the directory with the headers to includes
.
Just FYI,
includes
adds all files that are contained in the provided directories to dependencies. So you could just add the directory with the headers toincludes
.
Thanks @blaugold! If option 1 works though, I believe that option 1 is better. But if there's issues with option 1, than option 2 is a good one too.
The CBuilder lists the C sources, but not the header files.
https://github.com/dart-lang/native/blob/952da66a77c09872816227f5313273d51a8f4ba5/pkgs/native_assets_cli/example/build/native_add_library/hook/build.dart#L12-L19
This means the headers are not added to the dependencies. Which means that any changes to the header files do not cause cache invalidation.
Thanks for the feedback @SaltySpaghetti!
Possible solutions:
.h
files to sources, which will add them to the compiler invocation (which is fine for clang-like compiler)..h
files out.includes
(ty @blaugold!)List<String> headers
parameter/field. Which would only resolve the list of paths and add it to theBuildOutput
dependencies.List<String> dependencies
parameter/field.headers
.I'm leaning towards option 1.
A PR would contain:
sources:
sources
that it should include header files..h
files in the compiler invocation.