From 37517ba8bba274360b51c52d10154c37fbe38f73 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sat, 17 Dec 2022 15:37:37 -0700 Subject: [PATCH] Meta: Prefer clang as a host compiler to gcc --- Meta/serenity.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Meta/serenity.sh b/Meta/serenity.sh index 9db6b614d0c..f933baf93ff 100755 --- a/Meta/serenity.sh +++ b/Meta/serenity.sh @@ -192,13 +192,6 @@ pick_host_compiler() { return fi - find_newest_compiler egcc gcc gcc-12 /usr/local/bin/gcc-12 /opt/homebrew/bin/gcc-12 - if is_supported_compiler "$HOST_COMPILER"; then - export CC="${HOST_COMPILER}" - export CXX="${HOST_COMPILER/gcc/g++}" - return - fi - find_newest_compiler clang clang-13 clang-14 clang-15 /opt/homebrew/opt/llvm/bin/clang if is_supported_compiler "$HOST_COMPILER"; then export CC="${HOST_COMPILER}" @@ -206,6 +199,13 @@ pick_host_compiler() { return fi + find_newest_compiler egcc gcc gcc-12 /usr/local/bin/gcc-12 /opt/homebrew/bin/gcc-12 + if is_supported_compiler "$HOST_COMPILER"; then + export CC="${HOST_COMPILER}" + export CXX="${HOST_COMPILER/gcc/g++}" + return + fi + die "Please make sure that GCC version 12, Clang version 13, or higher is installed." }