summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-03-26 19:59:02 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-03-27 11:32:42 -0700
commitdce590fb21af844230727b283f6c8bf759ea805c (patch)
tree1d974070dcec8cbce00c6a9e8db0b844633731dc /lib
parentb0b882cbb3d903a85413acb0439a02d6ac9e26fc (diff)
downloadspack-dce590fb21af844230727b283f6c8bf759ea805c.tar.gz
spack-dce590fb21af844230727b283f6c8bf759ea805c.tar.bz2
spack-dce590fb21af844230727b283f6c8bf759ea805c.tar.xz
spack-dce590fb21af844230727b283f6c8bf759ea805c.zip
Add a dso_suffix variable to build_environment
- Consolidate this in one place so that we don't have to do it in every build. - Will update further once better OS support is committed. Shoudl really be an attribute of the forthcoming `Platform` class.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/build_environment.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index 119a255a34..640db0c1d1 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -59,6 +59,11 @@ SPACK_SHORT_SPEC = 'SPACK_SHORT_SPEC'
SPACK_DEBUG_LOG_DIR = 'SPACK_DEBUG_LOG_DIR'
+# Platform-specific library suffix.
+dso_suffix = 'dylib' if sys.platform == 'darwin' else 'so'
+
+
+
class MakeExecutable(Executable):
"""Special callable executable object for make so the user can
specify parallel or not on a per-invocation basis. Using
@@ -246,6 +251,9 @@ def set_module_variables_for_package(pkg, module):
# a Prefix object.
m.prefix = pkg.prefix
+ # Platform-specific library suffix.
+ m.dso_suffix = dso_suffix
+
def get_rpaths(pkg):
"""Get a list of all the rpaths for a package."""