Skip to content

GH-50637: [C++] Register Abseil bundled static libraries in build_absl()#50643

Closed
KHARSHAVARDHAN-eng wants to merge 1 commit into
apache:mainfrom
KHARSHAVARDHAN-eng:gh-50637-absl-bundled-libs
Closed

GH-50637: [C++] Register Abseil bundled static libraries in build_absl()#50643
KHARSHAVARDHAN-eng wants to merge 1 commit into
apache:mainfrom
KHARSHAVARDHAN-eng:gh-50637-absl-bundled-libs

Conversation

@KHARSHAVARDHAN-eng

@KHARSHAVARDHAN-eng KHARSHAVARDHAN-eng commented Jul 26, 2026

Copy link
Copy Markdown

Rationale for this change

Bundled Abseil static library targets (absl::...) are currently registered in ARROW_BUNDLED_STATIC_LIBS from build_protobuf() under the CMAKE_CROSSCOMPILING code path.

Since these targets belong to Abseil, their registration is more appropriately owned by build_absl(). Moving the registration there removes the coupling between Abseil target registration and Protobuf, while ensuring the bundled Abseil targets are registered whenever Abseil is built from source.

Closes: #50637

What changes are included in this PR?

  • Move the registration of bundled Abseil static library targets (absl::...) from build_protobuf() to build_absl().
  • Export the updated ARROW_BUNDLED_STATIC_LIBS from build_absl() using PARENT_SCOPE.
  • Remove the redundant Abseil target registration from build_protobuf().

Are these changes tested?

Yes.

  • Configured and built arrow_static with bundled dependencies enabled (ARROW_DEPENDENCY_SOURCE=BUNDLED).
  • Verified the generated ArrowConfig.cmake contains the expected bundled Abseil targets followed by protobuf::libprotobuf.
  • Verified the CMake conditional code path guarded by CMAKE_CROSSCOMPILING.

Are there any user-facing changes?

No.

This change only affects the internal CMake dependency registration logic used when building bundled dependencies.

…ld_absl() instead of build_protobuf()

Currently, Abseil bundled static libraries (`absl::...`) are registered in
`ARROW_BUNDLED_STATIC_LIBS` inside `build_protobuf()` within an `if(CMAKE_CROSSCOMPILING)` block.

This moves the Abseil bundled static library target registration to `build_absl()`,
ensuring Abseil targets are always registered when building Abseil from source and
decoupling Abseil registration from `build_protobuf()`.

Closes: apache#50637
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #50637 has been automatically assigned in GitHub to PR creator.

@Reranko05

Copy link
Copy Markdown
Contributor

A PR (#50638) for this issue has already been opened and is currently under review. Since this issue is already being addressed, could you close this PR? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C++] Abseil bundled static libraries are registered in build_protobuf() instead of build_absl()

2 participants