build(Makefile): LLD linker, objects/ dir, LTO+linker opts

- Compiler selection: Remove TCC, default to Clang, GCC fallback
- LLD linker: -fuse-ld=lld for all builds (peachwm + peachmsg)
- Object relocation: .o files output to objects/{src,parser,protocols,peachmsg}/
- Clean target: rm -rf objects + transitional stale .o cleanup
- Release: -flto=thin, linker opts (gc-sections, icf=safe, z now, etc.)
- Release: strip both peachwm and peachmsg binaries
- README + CONTRIBUTING: Add LLD dependency, update build docs
- .gitignore: Add objects/ directory
This commit is contained in:
2026-07-05 20:27:47 -04:00
parent 2773724d77
commit 79e7e26a49
4 changed files with 58 additions and 38 deletions
+5 -3
View File
@@ -73,9 +73,11 @@ PeachWM follows a consistent style throughout the codebase. Please match it.
### Build and Compiler
- The project uses **C23** (`-std=c23`).
- The **Makefile** is POSIX make. Do not introduce autotools, CMake, or meson.
- Ensure your code compiles cleanly with `make debug` and `make release` --
CI checks both targets.
- The **Makefile** uses GNU make extensions (`.ONESHELL`, `ifeq`, target-specific
variables). Do not introduce autotools, CMake, or meson.
- Ensure your code compiles cleanly with `make debug` and `make release` -- the
project requires Clang (default) and the LLD linker for building. CI checks
both targets.
These guidelines are suggestions, not hard rules. When in doubt, match the
style of the surrounding code.