targets: first pass at target detection for linux
Add llnl.util.cpu_name, with initial support for detecting different microarchitectures on Linux. This also adds preliminary changes for compiler support and variants to control the optimizatoin levels by target. This does not yet include translations of targets to particular compilers; that is left to another PR. Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This commit is contained in:

committed by
Todd Gamblin

parent
a940ff34d7
commit
dfabf5d6b1
4
lib/spack/env/cc
vendored
4
lib/spack/env/cc
vendored
@@ -32,6 +32,7 @@ parameters=(
|
||||
SPACK_CXX_RPATH_ARG
|
||||
SPACK_F77_RPATH_ARG
|
||||
SPACK_FC_RPATH_ARG
|
||||
SPACK_TARGET_ARGS
|
||||
SPACK_SHORT_SPEC
|
||||
SPACK_SYSTEM_DIRS
|
||||
)
|
||||
@@ -78,7 +79,7 @@ function system_dir {
|
||||
}
|
||||
|
||||
for param in "${parameters[@]}"; do
|
||||
if [[ -z ${!param} ]]; then
|
||||
if [[ -z ${!param+x} ]]; then
|
||||
die "Spack compiler must be run from Spack! Input '$param' is missing."
|
||||
fi
|
||||
done
|
||||
@@ -373,6 +374,7 @@ case "$mode" in
|
||||
CXX)
|
||||
flags=("${flags[@]}" "${SPACK_CXXFLAGS[@]}") ;;
|
||||
esac
|
||||
args=(${SPACK_TARGET_ARGS[@]} "${args[@]}")
|
||||
;;
|
||||
esac
|
||||
|
||||
|
Reference in New Issue
Block a user