From 0f85988b6f9ade7b6cf0ebd5a5c3a130f1a9e3a9 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Tue, 23 Apr 2024 16:58:57 -0400 Subject: [PATCH] sparse: use fails_with block and restrict `gcc` to macOS Signed-off-by: Michael Cho --- Formula/s/sparse.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Formula/s/sparse.rb b/Formula/s/sparse.rb index 05b1a42f705f0..0bb8bb1099247 100644 --- a/Formula/s/sparse.rb +++ b/Formula/s/sparse.rb @@ -25,10 +25,14 @@ class Sparse < Formula sha256 cellar: :any_skip_relocation, x86_64_linux: "8c282a77e53c828abe22a69af0b1dd9cb124b333344f9be1b0f0f3d0a55a3fb0" end - depends_on "gcc" if DevelopmentTools.clang_build_version < 1100 + on_macos do + depends_on "gcc" if DevelopmentTools.clang_build_version < 1100 + end - # error: use of unknown builtin '__builtin_clrsb' - fails_with :clang if DevelopmentTools.clang_build_version < 1100 + fails_with :clang do + build 1099 + cause "error: use of unknown builtin '__builtin_clrsb'" + end def install # BSD "install" does not understand the GNU -D flag.