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(
env: T.nilable(String),
cc: T.nilable(String),
build_bottle: T.nilable(T::Boolean),
build_bottle: T::Boolean,
bottle_arch: T.nilable(String),
_block: T.proc.returns(T.untyped),
).returns(T.untyped)

View File

@ -35,13 +35,14 @@ module SharedEnvExtension
sig {
params(
formula: T.nilable(Formula),
cc: T.nilable(String),
build_bottle: T.nilable(T::Boolean),
bottle_arch: T.nilable(T::Boolean),
formula: T.nilable(Formula),
cc: T.nilable(String),
build_bottle: T.nilable(T::Boolean),
bottle_arch: T.nilable(String),
testing_formula: T::Boolean,
).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
@cc = cc
@build_bottle = build_bottle

View File

@ -16,13 +16,14 @@ module Stdenv
# @private
sig {
params(
formula: T.nilable(Formula),
cc: T.nilable(String),
build_bottle: T.nilable(T::Boolean),
bottle_arch: T.nilable(T::Boolean),
formula: T.nilable(Formula),
cc: T.nilable(String),
build_bottle: T.nilable(T::Boolean),
bottle_arch: T.nilable(String),
testing_formula: T::Boolean,
).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
self["HOMEBREW_ENV"] = "std"

View File

@ -44,13 +44,14 @@ module Superenv
# @private
sig {
params(
formula: T.nilable(Formula),
cc: T.nilable(String),
build_bottle: T.nilable(T::Boolean),
bottle_arch: T.nilable(T::Boolean),
formula: T.nilable(Formula),
cc: T.nilable(String),
build_bottle: T.nilable(T::Boolean),
bottle_arch: T.nilable(String),
testing_formula: T::Boolean,
).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
send(compiler)

View File

@ -3,7 +3,10 @@
module Stdenv
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 "LIBRARY_PATH", HOMEBREW_PREFIX/"lib"

View File

@ -11,7 +11,10 @@ module Superenv
# @private
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_DYNAMIC_LINKER"] = determine_dynamic_linker_path
self["HOMEBREW_RPATH_PATHS"] = determine_rpath_paths(@formula)

View File

@ -11,7 +11,10 @@ module Stdenv
end
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
# mixed character sets

View File

@ -121,7 +121,10 @@ module Superenv
self["HOMEBREW_SDKROOT"] = nil
self["HOMEBREW_DEVELOPER_DIR"] = nil
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
# reliably figure this out with Xcode 8 and above.