Subject: Re: [PATCH] regex: not all macOS platforms seem to have REG_ENHANCED

From: Junio C Hamano <[email-masked]>
Date: Fri, 20 Mar 2026 09:57:28 -0700

Johannes Schindelin <[email-masked]> writes:

> Work around this by setting `NO_REGEX` when `CC=clang` on Darwin, which
> makes the build use Git's bundled regex implementation instead of the
> system one.  This sidesteps the missing `REG_ENHANCED` define entirely.

While this may make things built identically between CI environment
and end-user environment, do we have to worry about what we lose by
not using system supplied regex library?

If the answer is "no, we do not lose anything, and even if we do,
that's miniscule loss that does not matter", then I like the
approach.

I wonder if we could do something like this instead?

	ifeq ($(CC),clang)
		CC := /usr/bin/clang
	eneidf

as was suggested in one of the downthread messages by René?

Thanks.