added package as argument to setup_platform_environment

This commit is contained in:
Gregory Becker 2016-07-20 12:26:31 -07:00
parent 6983c1d30d
commit eda1176ba7
3 changed files with 6 additions and 3 deletions

View File

@ -190,7 +190,7 @@ def operating_system(self, name):
return self.operating_sys.get(name, None)
@classmethod
def setup_platform_environment(self, env):
def setup_platform_environment(self, pkg, env):
""" Subclass can override this method if it requires any
platform-specific build environment modifications.
"""

View File

@ -444,7 +444,7 @@ def setup_package(pkg, dirty=False):
set_compiler_environment_variables(pkg, spack_env)
set_build_environment_variables(pkg, spack_env, dirty)
pkg.spec.architecture.platform.setup_platform_environment(spack_env)
pkg.spec.architecture.platform.setup_platform_environment(pkg, spack_env)
load_external_modules(pkg)
# traverse in postorder so package can use vars from its dependencies
spec = pkg.spec

View File

@ -45,11 +45,14 @@ def __init__(self):
self.add_operating_system('CNL10', Cnl())
@classmethod
def setup_platform_environment(self, env):
def setup_platform_environment(self, pkg, env):
""" Change the linker to default dynamic to be more
similar to linux/standard linker behavior
"""
env.set('CRAYPE_LINK_TYPE', 'dynamic')
cray_wrapper_names = join_path(spack.build_env_path, 'cray')
if os.path.isdir(cray_wrapper_names):
env.prepend_path('PATH', cray_wrapper_names)
@classmethod
def detect(self):