Please honor CFLAGS
Nobody has claimed this yet.
- #8464 by @glondu — closed without merging
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 277
Description
Desired Behavior
Dune should take into account the CFLAGS environment variable when compiling C code (similarly with CXXFLAGS and C++).
Rationale
Using these environment variables is standard in build systems (e.g. make).
In Debian, we use these variables to have some options used by many (if not all) packages at once.
In particular, one of the options set by Debian is the file prefix map: -ffile-prefix-map=/tmp/foo=., which is important for reproducibility.
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 tracing Dune's C and C++ compilation flag handling and review the context of linked pull request #8464. Reproduce a build with CFLAGS and CXXFLAGS, then verify that options such as -ffile-prefix-map are honored when compiling C and C++ code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp, ocaml
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100