ENV: fix missing arg for generic OS and correct type sigs

This commit is contained in:
Bo Anderson 2021-02-26 05:10:32 +00:00
parent d911596af9
commit 65c03573c6
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65
8 changed files with 35 additions and 20 deletions

View File

@ -35,7 +35,7 @@ module EnvActivation
params( params(
env: T.nilable(String), env: T.nilable(String),
cc: T.nilable(String), cc: T.nilable(String),
build_bottle: T.nilable(T::Boolean), build_bottle: T::Boolean,
bottle_arch: T.nilable(String), bottle_arch: T.nilable(String),
_block: T.proc.returns(T.untyped), _block: T.proc.returns(T.untyped),
).returns(T.untyped) ).returns(T.untyped)

View File

@ -38,10 +38,11 @@ module SharedEnvExtension
formula: T.nilable(Formula), formula: T.nilable(Formula),
cc: T.nilable(String), cc: T.nilable(String),
build_bottle: T.nilable(T::Boolean), build_bottle: T.nilable(T::Boolean),
bottle_arch: T.nilable(T::Boolean), bottle_arch: T.nilable(String),
testing_formula: T::Boolean,
).void ).void
} }
def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_arch: nil) def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_arch: nil, testing_formula: false)
@formula = formula @formula = formula
@cc = cc @cc = cc
@build_bottle = build_bottle @build_bottle = build_bottle

View File

@ -19,10 +19,11 @@ module Stdenv
formula: T.nilable(Formula), formula: T.nilable(Formula),
cc: T.nilable(String), cc: T.nilable(String),
build_bottle: T.nilable(T::Boolean), build_bottle: T.nilable(T::Boolean),
bottle_arch: T.nilable(T::Boolean), bottle_arch: T.nilable(String),
testing_formula: T::Boolean,
).void ).void
} }
def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_arch: nil) def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_arch: nil, testing_formula: false)
super super
self["HOMEBREW_ENV"] = "std" self["HOMEBREW_ENV"] = "std"

View File

@ -47,10 +47,11 @@ module Superenv
formula: T.nilable(Formula), formula: T.nilable(Formula),
cc: T.nilable(String), cc: T.nilable(String),
build_bottle: T.nilable(T::Boolean), build_bottle: T.nilable(T::Boolean),
bottle_arch: T.nilable(T::Boolean), bottle_arch: T.nilable(String),
testing_formula: T::Boolean,
).void ).void
} }
def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_arch: nil) def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_arch: nil, testing_formula: false)
super super
send(compiler) send(compiler)

View File

@ -3,7 +3,10 @@
module Stdenv module Stdenv
def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_arch: nil, testing_formula: false) def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_arch: nil, testing_formula: false)
generic_setup_build_environment(formula: formula, cc: cc, build_bottle: build_bottle, bottle_arch: bottle_arch) generic_setup_build_environment(
formula: formula, cc: cc, build_bottle: build_bottle,
bottle_arch: bottle_arch, testing_formula: testing_formula
)
prepend_path "CPATH", HOMEBREW_PREFIX/"include" prepend_path "CPATH", HOMEBREW_PREFIX/"include"
prepend_path "LIBRARY_PATH", HOMEBREW_PREFIX/"lib" prepend_path "LIBRARY_PATH", HOMEBREW_PREFIX/"lib"

View File

@ -11,7 +11,10 @@ module Superenv
# @private # @private
def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_arch: nil, testing_formula: false) def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_arch: nil, testing_formula: false)
generic_setup_build_environment(formula: formula, cc: cc, build_bottle: build_bottle, bottle_arch: bottle_arch) generic_setup_build_environment(
formula: formula, cc: cc, build_bottle: build_bottle,
bottle_arch: bottle_arch, testing_formula: testing_formula
)
self["HOMEBREW_OPTIMIZATION_LEVEL"] = "O2" self["HOMEBREW_OPTIMIZATION_LEVEL"] = "O2"
self["HOMEBREW_DYNAMIC_LINKER"] = determine_dynamic_linker_path self["HOMEBREW_DYNAMIC_LINKER"] = determine_dynamic_linker_path
self["HOMEBREW_RPATH_PATHS"] = determine_rpath_paths(@formula) self["HOMEBREW_RPATH_PATHS"] = determine_rpath_paths(@formula)

View File

@ -11,7 +11,10 @@ module Stdenv
end end
def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_arch: nil, testing_formula: false) def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_arch: nil, testing_formula: false)
generic_setup_build_environment(formula: formula, cc: cc, build_bottle: build_bottle, bottle_arch: bottle_arch) generic_setup_build_environment(
formula: formula, cc: cc, build_bottle: build_bottle,
bottle_arch: bottle_arch, testing_formula: testing_formula
)
# sed is strict, and errors out when it encounters files with # sed is strict, and errors out when it encounters files with
# mixed character sets # mixed character sets

View File

@ -121,7 +121,10 @@ module Superenv
self["HOMEBREW_SDKROOT"] = nil self["HOMEBREW_SDKROOT"] = nil
self["HOMEBREW_DEVELOPER_DIR"] = nil self["HOMEBREW_DEVELOPER_DIR"] = nil
end end
generic_setup_build_environment(formula: formula, cc: cc, build_bottle: build_bottle, bottle_arch: bottle_arch) generic_setup_build_environment(
formula: formula, cc: cc, build_bottle: build_bottle,
bottle_arch: bottle_arch, testing_formula: testing_formula
)
# Filter out symbols known not to be defined since GNU Autotools can't # Filter out symbols known not to be defined since GNU Autotools can't
# reliably figure this out with Xcode 8 and above. # reliably figure this out with Xcode 8 and above.