Skip to content

Commit b26abdf

Browse files
committed
Merge branch 'js/macos-homebrew-forgets-reg-enhanced' into jch
The build on macOS with Clang is fixed to work around a Homebrew change that exposed an issue with missing REG_ENHANCED. * js/macos-homebrew-forgets-reg-enhanced: osx-clang: work around Homebrew's clang lacking REG_ENHANCED
2 parents 081ee4a + 11359a6 commit b26abdf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

config.mak.uname

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,17 @@ ifeq ($(uname_S),Darwin)
172172
NEEDS_GOOD_LIBICONV = UnfortunatelyYes
173173
endif
174174

175+
# Homebrew's LLVM clang ships a regex.h that lacks REG_ENHANCED,
176+
# which is needed for USE_ENHANCED_BASIC_REGULAR_EXPRESSIONS above.
177+
# Use our bundled regex instead. This became a practical problem
178+
# when Homebrew 5.1.0 started auto-linking versioned keg-only
179+
# formulae (like llvm@15) into $(HOMEBREW_PREFIX)/bin/, causing
180+
# CC=clang in CI to silently pick up Homebrew's clang instead of
181+
# Apple's /usr/bin/clang.
182+
ifeq ($(CC),clang)
183+
NO_REGEX = HomebrewsClangUsesARegexThatLacksREG_ENHANCED
184+
endif
185+
175186
# The builtin FSMonitor on MacOS builds upon Simple-IPC. Both require
176187
# Unix domain sockets and PThreads.
177188
ifndef NO_PTHREADS

0 commit comments

Comments
 (0)