summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGregory Becker <becker33.llnl.gov>2016-07-20 12:26:31 -0700
committerGregory Becker <becker33.llnl.gov>2016-07-20 12:26:31 -0700
commiteda1176ba7d70327ca847d6b17afa02f8cca0d5b (patch)
tree16054f76b696a26de414db0cc70d802db0b8bb93 /lib
parent6983c1d30d6e4f93ee8d8a0df87e3c9ea8cde103 (diff)
downloadspack-eda1176ba7d70327ca847d6b17afa02f8cca0d5b.tar.gz
spack-eda1176ba7d70327ca847d6b17afa02f8cca0d5b.tar.bz2
spack-eda1176ba7d70327ca847d6b17afa02f8cca0d5b.tar.xz
spack-eda1176ba7d70327ca847d6b17afa02f8cca0d5b.zip
added package as argument to setup_platform_environment
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/architecture.py2
-rw-r--r--lib/spack/spack/build_environment.py2
-rw-r--r--lib/spack/spack/platforms/cray_xc.py5
3 files changed, 6 insertions, 3 deletions
diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py
index 6c3c478f91..974505ee3a 100644
--- a/lib/spack/spack/architecture.py
+++ b/lib/spack/spack/architecture.py
@@ -190,7 +190,7 @@ class Platform(object):
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.
"""
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index fbcba08367..5affd3c7c5 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -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
diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py
index aee375ac89..2b065d5bbd 100644
--- a/lib/spack/spack/platforms/cray_xc.py
+++ b/lib/spack/spack/platforms/cray_xc.py
@@ -45,11 +45,14 @@ class CrayXc(Platform):
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):