mirror of
https://github.com/rizsotto/Bear.git
synced 2026-05-28 00:20:45 +02:00
be851b9f00
Wrapper mode now splits values like CC="gcc -std=c11" into program and trailing flags on whitespace, resolves the program via the existing masquerade-aware path, and rewrites the env var so the build still receives the flags (CC=<wrapper_path> -std=c11). The override is space-joined with no shell quoting, because neither $CC expansion (no quote removal) nor GNU Make recipes handed to sh -c round-trip added quoting correctly for common flags like -DFOO=1. The no-flag case is a bare wrapper-path string, matching pre-feature output. resolve_program_path is untouched so the interception-wrapper-recursion contract is preserved. The man page points users at CFLAGS / CXXFLAGS / LDFLAGS for anything beyond simple trailing flags, and notes that the convention is a Unix / GNU Make inheritance that does not apply to native Windows build tooling. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>