Skip to content

Commit

Permalink
Improve message; also check in bindgen
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Jan 9, 2025
1 parent 36e5159 commit 8acd16d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion aws-lc-fips-sys/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ endif()

add_subdirectory(aws-lc aws-lc EXCLUDE_FROM_ALL)
if(NOT EXISTS aws-lc/CMakeLists.txt)
message(WARNING "###### WARNING: MISSING GIT SUBMODULE ###### Did you initialize the repo's git submodules? CMakeLists.txt not found.")
message(WARNING "###### WARNING: MISSING GIT SUBMODULE ###### Did you initialize the repo's git submodules? CMakeLists.txt not found.\n -- run 'git submodule update --init --recursive' to initialize.")
endif()

if (BUILD_LIBSSL)
Expand Down
2 changes: 1 addition & 1 deletion aws-lc-sys/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ endif()

add_subdirectory(aws-lc aws-lc EXCLUDE_FROM_ALL)
if(NOT EXISTS aws-lc/CMakeLists.txt)
message(WARNING "###### WARNING: MISSING GIT SUBMODULE ###### Did you initialize the repo's git submodules? CMakeLists.txt not found.")
message(WARNING "###### WARNING: MISSING GIT SUBMODULE ###### Did you initialize the repo's git submodules? CMakeLists.txt not found.\n -- run 'git submodule update --init --recursive' to initialize.")
endif()

if (BUILD_LIBSSL)
Expand Down
7 changes: 6 additions & 1 deletion aws-lc-sys/builder/cc_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,15 @@ impl CcBuilder {
.join("compiler_features_tests")
.join(format!("{basename}.c"));
if !source_file.exists() {
emit_warning("######");
emit_warning("###### WARNING: MISSING GIT SUBMODULE ######");
emit_warning(&format!(
"###### WARNING: MISSING GIT SUBMODULE ###### Did you initialize the repo's git submodules? Unable to find source file: {:?}.",
" -- Did you initialize the repo's git submodules? Unable to find source file: {:?}.",
&source_file
));
emit_warning(" -- run 'git submodule update --init --recursive' to initialize.");
emit_warning("######");
emit_warning("######");
}
cc_build
.file(source_file)
Expand Down
12 changes: 12 additions & 0 deletions aws-lc-sys/builder/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,18 @@ fn main() {
bindings_available = true;
}
} else if is_bindgen_required() {
let aws_lc_crypto_dir = Path::new(&manifest_dir).join("aws-lc").join("crypto");
if !aws_lc_crypto_dir.exists() {
emit_warning("######");
emit_warning("###### WARNING: MISSING GIT SUBMODULE ######");
emit_warning(&format!(
" -- Did you initialize the repo's git submodules? Unable to find crypto directory: {:?}.",
&aws_lc_crypto_dir
));
emit_warning(" -- run 'git submodule update --init --recursive' to initialize.");
emit_warning("######");
emit_warning("######");
}
bindings_available = handle_bindgen(&manifest_dir, &prefix);
} else {
bindings_available = true;
Expand Down

0 comments on commit 8acd16d

Please sign in to comment.