Repository navigation
GH-55279: [C++] Match compute-testing definitions to test linkage - #55280
ConnorQi01 wants to merge 1 commit into
Conversation
Use selected test linkage instead of static-library availability for Windows API definitions. The original DLPack target link failure reproduces; the patched target passes all 39 tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
|
|
|
There was a problem hiding this comment.
🟢 Approval recommended
The narrow condition change matches test linkage, preserves static-test behavior, and has no identified blocking issues.
No open issues 🎉
What changed in this PR
Fixes GH-55279 by aligning the Windows compute-testing helper’s static API definitions with the selected test linkage, preventing shared-linked tests from inheriting static declarations.
Changes:
- Uses
ARROW_TEST_LINKAGE STREQUAL "static"instead ofARROW_BUILD_STATIC. - Preserves library availability and test coverage; only the helper’s compile-definition condition changes.
| File | Description |
|---|---|
cpp/src/arrow/compute/CMakeLists.txt |
Gates Windows static API definitions on selected test linkage. |
Review effort: Balanced
|
|
|
fyi @Reranko05, @kou this would change: https://github.com/apache/arrow/pull/50606/changes#diff-a2a36a692f60885b3c84c80b663cd2730bf3d5e5809755e4559bdafe2006c64dR49 (and perhaps needed for engine/CMakeLists.txt too, not just compute/CMakeLists.txt?) |
Rationale for this change
Closes #55279.
ARROW_BUILD_STATICindicates library availability, not selected testlinkage. When shared-linked Windows tests inherit static API definitions
through
arrow_compute_testing,arrow-dlpack-testfails with duplicatearrow::Statusdefinitions.What changes are included in this PR?
Select the helper's Windows static API definitions using
ARROW_TEST_LINKAGE STREQUAL "static"instead ofARROW_BUILD_STATIC.No library variant is disabled and no test is removed.
Are these changes tested?
The real DLPack target at
d228ba5reproduces the original LNK2005/LNK1169.After the change, rebuilding in the same directory succeeds and all
39 DLPack tests from 10 suites pass.
The extracted exact target section additionally passes shared-tests with both
variants, static-tests, and shared-only linkage controls. The patch also
applies to current main
4a6ebc06. The full Arrow suite was not run.Are there any user-facing changes?
Only the Windows test helper's compile definitions change. No public API or
library-build option changes.
Was AI used for this PR?
Copilot assisted with diagnosis, the conditional change, the targeted
validation workflow, and this description. No internal compiler inputs or
private pipeline logs are included.
PR code and description written by:
Reviewed before submission by: