CodeshipElectric bee4 min readintermediate
Makefile performance: built-in rules
Summary
GNU Make scans every built‑in implicit rule for each target, adding unnecessary overhead. Using the -r (or --no-builtin-rules) flag disables this scanning and can speed up large or no‑op builds by up to ~30%.
- Add -r or --no-builtin-rules to GNU Make to skip all built‑in implicit rules
- Disabling built‑ins cut a 15k‑file build from 60.2 s to 42.9 s (≈28 % faster) and a no‑op build from 6.0 s to 5.2 s
- If you still need specific built‑in rules, define them explicitly in the makefile and keep -r enabled
- List built‑in rules with gmake -p; they appear marked as "built-in"
Anyone using GNU Make for sizable or frequent builds should consider disabling built‑in rules to reduce build time overhead.
6/10

