flexlink: simplify static linking with libstdc++
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 115
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
Currently with flexlink, if you have a C++ binding and want to link it statically in your executable to avoid having to carry the dll around the only option that works is to manually set the name for the archive file like this (with MinGW):
-l:libstdc++.a -l:libpthread.a -Wl,-static
It would be nice if something like -lstdc++ -static was a thing so that flexlink can find the correct archive file as by default -lstdc++ -Wl,-static will use libstdc++.dll.a which is the shared version of libstdc++ and not the static one.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how flexlink resolves libraries for the MinGW command-line forms shown in the issue, especially the handling of -lstdc++ and -static. Confirm the behavior with a C++ binding and verify that the static libstdc++ archive is selected without requiring the explicit archive filename.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, ocaml
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100