Conversation
Reviewer's GuideThis PR introduces first-class support for both static and dynamic builds of the sigmund binary by parameterizing linker flags in the Makefile and wiring those options through CI and release workflows, while updating documentation to describe the new behavior and recommended usage in automation. Sequence diagram for GNU release matrix static vs dynamic buildssequenceDiagram
participant GH as github_actions
participant Job as build-linux-gnu_job
participant Matrix as matrix_entry
participant Env as build_env
participant Make as make_system
GH->>Job: trigger workflow release
Job->>Matrix: iterate include entries
loop for each GNU target
Matrix->>Env: set make_target and static_ldflags
alt native build (dockcross_image empty)
Job->>Env: run make clean
Job->>Make: invoke make make_target with STATIC_LDFLAGS from static_ldflags
Make-->>Job: produce sigmund or sigmund dynamic
else dockcross GNU build
Job->>Env: prepare dockcross script
Job->>Make: inside container, run make clean and make make_target with STATIC_LDFLAGS from static_ldflags
Make-->>Job: produce sigmund or sigmund dynamic
end
Job->>Job: package tarball using target name (gnu static or gnu dynamic)
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
sigmundby default while also supporting dynamic builds for smaller artifacts and CI use-cases.Description
Makefileto addLDFLAGS,STATIC_LDFLAGS, andTEST_LDFLAGS, keep static linking as the default build (make) viaSTATIC_LDFLAGS=-static, and keep an explicit dynamic targetmake sigmund-dynamic, withtesthonoringTEST_LDFLAGS..github/workflows/ci.yml) to build both static and dynamic variants in the compiler matrix and to run sanitizer jobs with dynamic linking (STATIC_LDFLAGS='' TEST_LDFLAGS='') to avoid static-sanitizer toolchain issues..github/workflows/release.yml) to produce both GNU static and GNU dynamic artifacts (matrix entries like*-gnu-staticand*-gnu-dynamic) while keeping musl artifacts explicitly*-musl-static, and to passSTATIC_LDFLAGSto themakeinvocation used by dockcross/native builds.README.mdQuickstart to document the static-by-default behavior, themake sigmund-dynamicoption, and recommended CI/release dual-artifact approach.Testing
make clean && makewhich produced a static binary andreadelf -d sigmundreported "There is no dynamic section in this file." (static build confirmed).make clean && make sigmund-dynamicandreadelf -d sigmundshowed a dynamic section includingShared library: [libc.so.6](dynamic build confirmed).make clean && make test(default static test build) and the test suite completed with all tests reportingPASS.make clean && make test TEST_LDFLAGS=''(dynamic test build) and the test suite also completed with all tests reportingPASS.Codex Task
Summary by Sourcery
Support both static and dynamic sigmund binaries across local builds, CI, and release workflows while keeping static builds as the default.
Enhancements:
CI:
Deployment:
Documentation: