Selaa lähdekoodia

Meta: Allow building with Apple clang 14.x

We previously disregarded Apple clang entirely, since no released
version was able to succesfully build Lagom. Xcode 14 seems to have
all the features we need, as we haven't added any code that needs
trunk clang features in quite a while.
Andrew Kaster 2 vuotta sitten
vanhempi
commit
d2e4565f72
1 muutettua tiedostoa jossa 2 lisäystä ja 4 poistoa
  1. 2 4
      Meta/serenity.sh

+ 2 - 4
Meta/serenity.sh

@@ -154,7 +154,8 @@ is_supported_compiler() {
     local MAJOR_VERSION=""
     local MAJOR_VERSION=""
     MAJOR_VERSION="${VERSION%%.*}"
     MAJOR_VERSION="${VERSION%%.*}"
     if $COMPILER --version 2>&1 | grep "Apple clang" >/dev/null; then
     if $COMPILER --version 2>&1 | grep "Apple clang" >/dev/null; then
-        return 1
+        # Apple Clang version check
+        [ "$MAJOR_VERSION" -ge 14 ] && return 0
     elif $COMPILER --version 2>&1 | grep "clang" >/dev/null; then
     elif $COMPILER --version 2>&1 | grep "clang" >/dev/null; then
         # Clang version check
         # Clang version check
         [ "$MAJOR_VERSION" -ge 13 ] && return 0
         [ "$MAJOR_VERSION" -ge 13 ] && return 0
@@ -172,9 +173,6 @@ find_newest_compiler() {
         if ! command -v "$CANDIDATE" >/dev/null 2>&1; then
         if ! command -v "$CANDIDATE" >/dev/null 2>&1; then
             continue
             continue
         fi
         fi
-        if $CANDIDATE --version 2>&1 | grep "Apple clang" >/dev/null; then
-            continue
-        fi
         if ! $CANDIDATE -dumpversion >/dev/null 2>&1; then
         if ! $CANDIDATE -dumpversion >/dev/null 2>&1; then
             continue
             continue
         fi
         fi