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