Skip to content

install.sh: Adopt LLVM as the default/preferred compilers#300

Merged
bonachea merged 4 commits intoBerkeleyLab:mainfrom
bonachea:install-llvm
Mar 5, 2026
Merged

install.sh: Adopt LLVM as the default/preferred compilers#300
bonachea merged 4 commits intoBerkeleyLab:mainfrom
bonachea:install-llvm

Conversation

@bonachea
Copy link
Member

@bonachea bonachea commented Mar 4, 2026

This PR converts install.sh so that instead of defaulting to the GCC compiler suite, the install script instead prefers the LLVM compiler suite (both in defaulting the choice of compilers and offering to install compilers via Homebrew).

Fixes #228 (by automating the workaround in install.sh)

Adds macOS CI coverage of install.sh invocation of Homebrew (which was previously missing) and updates documentation.

bonachea added 4 commits March 3, 2026 17:10
LLVM flang now officially supports PRIF, so that's most likely
what an end user actually wants. Update the install script defaults
to prefer flang, and prompt to brew install it when missing.

Also:

* Demote $CXX to be optional, because C++ is an optional dependency.

* Add invocation of `brew update` may be required to see the latest llvm/flang

* Fix many instances of `${VAR+x}` to `${VAR:+x}`, as the latter also
  correctly handles set to an empty string.

* Remove the unnecessary brew tap of fortran-lang/hombrew-fortran,
  the fpm cask is now available in the default repository.
@bonachea bonachea added this to the Caffeine 0.7.2 milestone Mar 4, 2026
@bonachea bonachea requested a review from rouson March 4, 2026 01:30
Copy link
Collaborator

@rouson rouson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bonachea bonachea merged commit dec6815 into BerkeleyLab:main Mar 5, 2026
36 checks passed
@bonachea bonachea deleted the install-llvm branch March 5, 2026 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Homebrew-installed LLVM 20 on macOS

2 participants