-
Notifications
You must be signed in to change notification settings - Fork 128
feat: add linker directive for VHF lib + move static linker directives from wdk-build to wdk-sys #685
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?
feat: add linker directive for VHF lib + move static linker directives from wdk-build to wdk-sys #685
Changes from 4 commits
88d3948
ed27cc2
0cce966
e8756f1
a3b51b8
453f9db
f8f26b7
20cced8
f0d20e6
f179fb7
9e6f1c8
2967d71
8348a3f
11453ac
082282c
0b5deed
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 |
|---|---|---|
|
|
@@ -32,6 +32,7 @@ use wdk_build::{ | |
| IoError, | ||
| KmdfConfig, | ||
| UmdfConfig, | ||
| add_link_directives, | ||
| configure_wdk_library_build_and_then, | ||
| }; | ||
|
|
||
|
|
@@ -269,9 +270,13 @@ fn generate_base(out_path: &Path, config: &Config) -> Result<(), ConfigError> { | |
| let header_contents = config.bindgen_header_contents([ApiSubset::Base])?; | ||
| trace!(header_contents = ?header_contents); | ||
|
|
||
| let bindgen_builder = bindgen::Builder::wdk_default(config)? | ||
| .with_codegen_config((CodegenConfig::TYPES | CodegenConfig::VARS).complement()) | ||
| .header_contents(&format!("{outfile_name}-input.h"), &header_contents); | ||
| let bindgen_builder = { | ||
| let builder = bindgen::Builder::wdk_default(config)? | ||
| .with_codegen_config((CodegenConfig::TYPES | CodegenConfig::VARS).complement()) | ||
| .header_contents(&format!("{outfile_name}-input.h"), &header_contents); | ||
|
|
||
| add_link_directives(builder, &config.link_directives(ApiSubset::Base)) | ||
|
Collaborator
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. If you mirror the
Collaborator
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. That
Contributor
Author
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. Redesigned the implementation to closely mirror the |
||
| }; | ||
| trace!(bindgen_builder = ?bindgen_builder); | ||
|
|
||
| let output_file_path = out_path.join(format!("{outfile_name}.rs")); | ||
|
|
@@ -360,7 +365,8 @@ fn generate_hid(out_path: &Path, config: &Config) -> Result<(), ConfigError> { | |
| for header_file in config.headers(ApiSubset::Hid)? { | ||
| builder = builder.allowlist_file(format!("(?i).*{header_file}.*")); | ||
| } | ||
| builder | ||
|
|
||
| add_link_directives(builder, &config.link_directives(ApiSubset::Hid)) | ||
| }; | ||
| trace!(bindgen_builder = ?bindgen_builder); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.