Merge pull request #13913 from carlocab/test-compiler

extend/ENV/std: ignore `fails_with` during `brew test`.
This commit is contained in:
Carlo Cabrera 2022-09-22 23:02:32 +08:00 committed by GitHub
commit 03b76113e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,14 @@ module Stdenv
# Os is the default Apple uses for all its stuff so let's trust them # Os is the default Apple uses for all its stuff so let's trust them
define_cflags "-Os #{SAFE_CFLAGS_FLAGS}" define_cflags "-Os #{SAFE_CFLAGS_FLAGS}"
begin
send(compiler) send(compiler)
rescue CompilerSelectionError
# We don't care if our compiler fails to build the formula during `brew test`.
raise unless testing_formula
send(DevelopmentTools.default_compiler)
end
return unless cc&.match?(GNU_GCC_REGEXP) return unless cc&.match?(GNU_GCC_REGEXP)