more merge work
This commit is contained in:
parent
80310a3b7c
commit
deb5011d08
@ -213,13 +213,12 @@ def set_compiler_environment_variables(pkg):
|
||||
if flags[flag] != []:
|
||||
env.set('SPACK_' + flag.upper(), ' '.join(f for f in flags[flag]))
|
||||
|
||||
#ifdef NEW
|
||||
env.set('SPACK_COMPILER_SPEC', str(pkg.spec.compiler))
|
||||
return env
|
||||
#else /* not NEW */
|
||||
|
||||
for mod in compiler.modules:
|
||||
load_module(mod)
|
||||
#endif /* not NEW */
|
||||
|
||||
return env
|
||||
|
||||
|
||||
def set_build_environment_variables(pkg, env):
|
||||
@ -283,16 +282,13 @@ def set_build_environment_variables(pkg, env):
|
||||
pcdir = join_path(p, maybe, 'pkgconfig')
|
||||
if os.path.isdir(pcdir):
|
||||
pkg_config_dirs.append(pcdir)
|
||||
#ifdef NEW
|
||||
env.set_path('PKG_CONFIG_PATH', pkg_config_dirs)
|
||||
|
||||
return env
|
||||
#else /* not NEW */
|
||||
path_put_first("PKG_CONFIG_PATH", pkg_config_dirs)
|
||||
env.prepend_path('PKG_CONFIG_PATH', pkg_config_dirs)
|
||||
|
||||
if pkg.spec.architecture.target.module_name:
|
||||
load_module(pkg.spec.architecture.target.module_name)
|
||||
#endif /* not NEW */
|
||||
|
||||
return env
|
||||
|
||||
|
||||
def set_module_variables_for_package(pkg, module):
|
||||
@ -368,16 +364,13 @@ def set_module_variables_for_package(pkg, module):
|
||||
|
||||
def get_rpaths(pkg):
|
||||
"""Get a list of all the rpaths for a package."""
|
||||
for spec in pkg.spec.traverse(root=False):
|
||||
if spec.external_module:
|
||||
load_module(spec.external_module)
|
||||
spec.external = get_path_from_module(spec.external_module)
|
||||
|
||||
rpaths = [pkg.prefix.lib, pkg.prefix.lib64]
|
||||
rpaths.extend(d.prefix.lib for d in pkg.spec.dependencies.values()
|
||||
if os.path.isdir(d.prefix.lib))
|
||||
rpaths.extend(d.prefix.lib64 for d in pkg.spec.dependencies.values()
|
||||
if os.path.isdir(d.prefix.lib64))
|
||||
for mod in pkg.spec.compiler.modules:
|
||||
rpaths.append(get_path_for_module(mod))
|
||||
return rpaths
|
||||
|
||||
|
||||
|
@ -120,6 +120,7 @@
|
||||
from spack.util.string import *
|
||||
from spack.util.prefix import Prefix
|
||||
from spack.virtual import ProviderIndex
|
||||
from spack.build_environment import get_path_from_module, load_module
|
||||
|
||||
# Valid pattern for an identifier in Spack
|
||||
identifier_re = r'\w[\w-]*'
|
||||
@ -1085,6 +1086,15 @@ def concretize(self):
|
||||
if s.namespace is None:
|
||||
s.namespace = spack.repo.repo_for_pkg(s.name).namespace
|
||||
|
||||
|
||||
for s in self.traverse(root=False):
|
||||
if spec.external_module:
|
||||
compiler = spack.compilers.compiler_for_spec(spec.compiler, spec.architecture.platform_os)
|
||||
for mod in compiler.modules:
|
||||
load_module(mod)
|
||||
|
||||
spec.external = get_path_from_module(spec.external_module)
|
||||
|
||||
# Mark everything in the spec as concrete, as well.
|
||||
self._mark_concrete()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user