github rizsotto/Bear 4.1.1

9 hours ago

What's Changed

Features

  • New compiler support: MSVC, clang-cl, Intel C/C++ (icx, icpx), NVIDIA HPC SDK (nvc, nvc++, nvfortran), ARM Compiler 6, and IBM Open XL
  • Windows improvements: case-insensitive executable matching and slash-prefix flag support (e.g. /Fo, /Ot)
  • Environment variable forwarding: data-driven per-compiler environment variable extraction, replacing hardcoded GCC-only handling
  • Install script: add DESTDIR support for packaging workflows

Bug Fixes

  • fix: canonical path generation on Windows stripping \\?\ prefix (#683)
  • fix: inconsistent flag inheritance - make all resolution transitive
  • fix: replace remaining panics with proper anyhow error handling

Performance

  • Eliminate temporary String allocations in flag pattern matching
  • Remove intermediate Vec<String> from FlagMatch
  • Pre-allocate Vec capacity in parse_arguments and parse_environment
  • Replace Box<dyn Arguments> with Argument enum (static dispatch)

Code Generation Overhaul

  • Extract bear-codegen crate from build.rs flag generation
  • Add flag dedup and conflict detection during inheritance
  • Add colon separator patterns and pass-through flag support
  • Add flag terminator support
  • Introduce ResolvedTable with snapshot, schema validation, and property-based tests

Internal Refactoring

  • Decouple intercept layer from semantic compiler recognition
  • Extract EntryFilter trait and FilteredOutputWriter into filtering module
  • Tighten module visibility (pub to pub(super) and private)
  • Simplify CompilerCommand to Command, remove OutputCommand wrapper

Documentation

  • Updated man page with correct schema version, complete compiler list, and cc/c++ defaults
  • Cleaned up README

Closed Issues

  • #683 - bear generates invalid canonical paths
  • #682 - install.sh should also have a DESTDIR variable

Full Changelog: 4.1.0...4.1.1

Don't miss a new Bear release

NewReleases is sending notifications on new releases.