extend/os/linux/extend/ENV/super.rb: add homebrew_extra_include_paths

This commit is contained in:
danielnachun 2022-07-16 18:01:27 -07:00
parent 6ab6382518
commit 47b6492098
No known key found for this signature in database
GPG Key ID: 7343CCAD07E2D0FB

View File

@ -37,6 +37,17 @@ module Superenv
paths
end
def homebrew_extra_isystem_paths
paths = []
# Add paths for GCC headers when building against glibc@2.13 because we have to use -nostdinc.
if deps.any? { |d| d.name == "glibc@2.13" }
gcc_include_dir = Utils.safe_popen_read(cc, "--print-file-name=include").chomp
gcc_include_fixed_dir = Utils.safe_popen_read(cc, "--print-file-name=include-fixed").chomp
paths << gcc_include_dir << gcc_include_fixed_dir
end
paths
end
def determine_rpath_paths(formula)
PATH.new(
*formula&.lib,