Merge pull request #40139 from obsidiansystems/modular-setup-hooks

treewide: Modular setup hooks
This commit is contained in:
John Ericson
2018-05-07 15:32:10 -04:00
committed by GitHub
35 changed files with 288 additions and 318 deletions
+1 -12
View File
@@ -14,18 +14,7 @@ var_templates_bool=(
NIX+ENFORCE_NO_NATIVE
)
# Accumulate infixes for taking in the right input parameters. See setup-hook
# for details.
declare -a role_infixes=()
if [ "${NIX_CC_WRAPPER_@infixSalt@_TARGET_BUILD:-}" ]; then
role_infixes+=(_BUILD_)
fi
if [ "${NIX_CC_WRAPPER_@infixSalt@_TARGET_HOST:-}" ]; then
role_infixes+=(_)
fi
if [ "${NIX_CC_WRAPPER_@infixSalt@_TARGET_TARGET:-}" ]; then
role_infixes+=(_TARGET_)
fi
accumulateRoles
# We need to mangle names for hygiene, but also take parameters/overrides
# from the environment.