Skip to content

Commit b9e3b03

Browse files
authored
Assorted fixes for Windows compilation (#778)
* Use OS convention when splitting AWS_LC_SYS*_INCLUDES Fixes #777 * Account for bindgen's configuration envvars Fixes #776
1 parent 8ed1be8 commit b9e3b03

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

aws-lc-fips-sys/builder/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub(crate) fn get_generated_include_path(manifest_dir: &Path) -> PathBuf {
107107

108108
pub(crate) fn get_aws_lc_fips_sys_includes_path() -> Option<Vec<PathBuf>> {
109109
option_env("AWS_LC_FIPS_SYS_INCLUDES")
110-
.map(|colon_delim_paths| colon_delim_paths.split(':').map(PathBuf::from).collect())
110+
.map(|v| std::env::split_paths(&v).collect())
111111
}
112112

113113
#[allow(dead_code)]

aws-lc-fips-sys/builder/sys_bindgen.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ fn prepare_bindings_builder(manifest_dir: &Path, options: &BindingOptions) -> bi
5656
.join("rust_wrapper.h")
5757
.display()
5858
.to_string(),
59-
);
59+
)
60+
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()));
6061

6162
if !options.disable_prelude {
6263
builder = builder.raw_line(PRELUDE);

aws-lc-sys/builder/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ pub(crate) fn get_generated_include_path(manifest_dir: &Path) -> PathBuf {
118118

119119
pub(crate) fn get_aws_lc_sys_includes_path() -> Option<Vec<PathBuf>> {
120120
option_env("AWS_LC_SYS_INCLUDES")
121-
.map(|colon_delim_paths| colon_delim_paths.split(':').map(PathBuf::from).collect())
121+
.map(|v| std::env::split_paths(&v).collect())
122122
}
123123

124124
#[allow(dead_code)]

0 commit comments

Comments
 (0)