mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
Meta: Detect Homebrew clang-format
Homebrew does not add upstream LLVM's install location to $PATH so as not to conflict with XCode tools, so we need to run `brew --prefix llvm` to figure out its install path.
This commit is contained in:
parent
e52f0a991b
commit
f1f6c4c0b6
Notes:
sideshowbarker
2024-07-17 05:13:56 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/f1f6c4c0b6 Pull-request: https://github.com/SerenityOS/serenity/pull/15751
1 changed files with 2 additions and 0 deletions
|
@ -30,6 +30,8 @@ if (( ${#files[@]} )); then
|
|||
CLANG_FORMAT=false
|
||||
if command -v clang-format-14 >/dev/null 2>&1 ; then
|
||||
CLANG_FORMAT=clang-format-14
|
||||
elif command -v brew >/dev/null 2>&1 && command -v "$(brew --prefix llvm@14)"/bin/clang-format >/dev/null 2>&1 ; then
|
||||
CLANG_FORMAT="$(brew --prefix llvm@14)"/bin/clang-format
|
||||
elif command -v $TOOLCHAIN_DIR/clang-format >/dev/null 2>&1 && $TOOLCHAIN_DIR/clang-format --version | grep -qF ' 14.' ; then
|
||||
CLANG_FORMAT=$TOOLCHAIN_DIR/clang-format
|
||||
elif command -v clang-format >/dev/null 2>&1 ; then
|
||||
|
|
Loading…
Reference in a new issue