Back to Bear

Bear on macOS

site/src/platforms/macos.md

4.2.01.2 KB
Original Source
<!-- Diataxis type: how-to -->

Bear on macOS

Wrapper is the default interception method on macOS: Apple-signed Xcode compilers block preload, because System Integrity Protection strips DYLD_INSERT_LIBRARIES before it can take effect (see how Bear works). Preload can be forced with intercept.mode: preload, but only works with SIP disabled.

Building through Xcode or xcodebuild

Xcode passes many flags through an @file response file, and Bear's default recording keeps that argument literal. Turn on format.arguments.from_response_files so an entry built through xcodebuild carries the actual flags.

Homebrew-installed compilers

Homebrew's GCC formula installs only versioned binaries (gcc-14, not gcc); Bear recognizes these by filename automatically (see Supported compilers).

Related: how Bear works for the preload/wrapper mechanism, Troubleshooting for output that comes out wrong, and the Recipes index for other tasks.