Skip to content

build: link chain archives before the common archive - #410

Open
unspecifiedcoder wants to merge 1 commit into
BlockstreamResearch:masterfrom
unspecifiedcoder:fix/407-static-library-link-order
Open

unspecifiedcoder wants to merge 1 commit into
BlockstreamResearch:masterfrom
unspecifiedcoder:fix/407-static-library-link-order

Conversation

@unspecifiedcoder

Copy link
Copy Markdown

Fixes #407.

Link the Bitcoin and Elements archives before the common archive so GNU ld can resolve their references. Shared sources are still compiled once.

Tested on Ubuntu 24.04, x86_64:

  • Unchanged master fails with GNU ld; the patch passes all 14 simplicity-sys tests with GNU ld and lld. Without default features, 8 pass.
  • Main library with GNU ld: 129 tests + 2 doctests pass with all features; 72 + 1 without default features.
  • Rust 1.74: 14 system tests and 129 library tests + 2 doctests pass.
  • Formatting, workspace Clippy and git diff --check pass.

Written with assistance from Codex (OpenAI).

Emit the common archive after Bitcoin and Elements so GNU ld can resolve their references with test-utils enabled. Keep shared sources compiled once.

Written with assistance from Codex (OpenAI).
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.

simplicity-sys: tests with test-utils fail to link on Linux since #393 (static library order)

1 participant