-
Notifications
You must be signed in to change notification settings - Fork 75
[ffigen] Add Header Files to CBuilder Sources #2098
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,24 @@ class CBuilder extends CTool implements Builder { | |
CBuilder.library({ | ||
required super.name, | ||
super.assetName, | ||
/// The list of source files to build the library. | ||
/// | ||
/// This should include both C source files (e.g., `.c`) and header files | ||
/// (e.g., `.h`). Including header files ensures that changes to them | ||
/// invalidate the build cache, triggering recompilation when necessary. | ||
/// For example, for a package named `native_add_library`: | ||
/// ```dart | ||
/// sources: [ | ||
/// 'src/native_add_library.c', | ||
/// 'src/native_add_library.h', | ||
/// 'src/dart_api_dl.c', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Omit |
||
/// 'src/dart_api_dl.h', | ||
/// ], | ||
/// ``` | ||
/// Supported by Clang-like compilers, which can optimize with precompiled | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
/// headers when `.h` files are included. If a compiler does not support this, | ||
/// the build system may filter `.h` files from the compilation step while | ||
/// still tracking them as dependencies. | ||
super.sources = const [], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the comment should go on the field rather than the constructor argument. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should the whole segment be moved or just this portion? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We comment fields not constructor params, so all of it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yup done removed that part |
||
super.includes = const [], | ||
super.frameworks = CTool.defaultFrameworks, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not have CBuilder documentation here. The native assets cli can be used with other builders. Add the documentation to the CBuilder instead.