Skip to content

fix(cmake): require all BoringSSL components - #3594

Merged
chenBright merged 1 commit into
apache:masterfrom
darion-yaphet:fix/cmake-boringssl-dependency-check
Oct 10, 2026
Merged

chenBright merged 1 commit into
apache:masterfrom
darion-yaphet:fix/cmake-boringssl-dependency-check

Conversation

@darion-yaphet

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Problem Summary:

When WITH_BORINGSSL is enabled, missing dependencies do not immediately stop configuration because find_package(BoringSSL) is not marked REQUIRED. The finder also validates a combined library list, which can incorrectly report success when the SSL library is missing but the Crypto library is present.

What is changed and the side effects?

Changed:

  • Require BoringSSL when WITH_BORINGSSL is enabled.
  • Validate the include directory, SSL library, and Crypto library separately.
  • Stop during dependency discovery and identify the missing components.

Side effects:

  • Incomplete BoringSSL installations now fail earlier with clearer diagnostics.
  • Performance effects: None; the changes affect CMake configuration only.
  • Breaking backward compatibility: None for valid dependency configurations.

Check List:

  • Validated isolated CMake checks for missing headers, missing SSL, missing Crypto, and all required variables present.
  • git diff --check passed.
  • Full compilation has not been run.
  • This change is a build-configuration fix; no new runtime feature is introduced.

Fail during dependency discovery when WITH_BORINGSSL is enabled and required components are missing.

Check the include directory, SSL library, and Crypto library separately to avoid reporting success for an incomplete library list.
@darion-yaphet darion-yaphet reopened this Oct 9, 2026
@wasphin
wasphin requested a balanced review from Copilot October 9, 2026 16:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

1 open finding
What changed in this PR

This PR tightens BoringSSL dependency discovery in CMake so that enabling WITH_BORINGSSL fails configuration early when any required BoringSSL component is missing.

Changes:

  • Make find_package(BoringSSL) required when WITH_BORINGSSL is enabled.
  • Validate BoringSSL include directory, SSL library, and Crypto library independently in the finder module.
File Description
cmake/​FindBoringSSL.cmake Adjusts find_package_handle_standard_args to require include dir + both SSL/Crypto libraries.
CMakeLists.txt Requires BoringSSL at configure time when WITH_BORINGSSL is enabled.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread cmake/FindBoringSSL.cmake
@@ -63,8 +63,9 @@ set(BORINGSSL_LIBRARIES ${BORINGSSL_SSL_LIBRARY} ${BORINGSSL_CRYPTO_LIBRARY}

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(BoringSSL DEFAULT_MSG
@wasphin

wasphin commented Oct 10, 2026

Copy link
Copy Markdown
Member

LGTM

@chenBright chenBright left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chenBright
chenBright merged commit 74e2c92 into apache:master Oct 10, 2026
67 of 71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants