configurator: allow c_test wihout linking
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 277
Description
The c_test function in the configurator API currently compiles and links the test C program. However, for some purposes compiling is enough (eg to check if a given symbol is defined).
There can be a big performance difference between compiling and linking compared with just compiling. For example, the configuration script of ocurl checks the existence of ~270 symbols. Under Unix, compiling and linking each C test program, takes ~60s to complete. Just compiling takes ~11s. By comparison, autoconf takes ~19s to do the same test.
Perhaps the API should be extended to offer the possibility of compiling, but not linking, the C test program?
See ygrek/ocurl#38 for some context.
Contributor guide
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 locating the configurator API implementation of c_test and any existing tests for C test compilation. Check how the current API invokes compilation and linking, then define the separate compile-only behavior requested. Done means callers can check C symbols without linking while the existing linked-test behavior remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, ocaml
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100