mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00

Fixes #10170 by preferring gcc@5 on linux This makes sure ENV.cc and ENV.cxx is correctly set: If a formula does not explicitely depend on a brewed gcc, ENV.cc is set to gcc-5 (system gcc-5 or brewed gcc-5) with this change, even if other gcc versions are installed on the system.
12 lines
262 B
Ruby
12 lines
262 B
Ruby
# typed: strict
|
|
# frozen_string_literal: true
|
|
|
|
class CompilerSelector
|
|
sig { returns(String) }
|
|
def preferred_gcc
|
|
# gcc-5 is the lowest gcc version we support on Linux.
|
|
# gcc-5 is the default gcc in Ubuntu 16.04 (used for our CI)
|
|
"gcc@5"
|
|
end
|
|
end
|