summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTom Scogland <scogland1@llnl.gov>2015-12-30 15:37:06 -0800
committerTom Scogland <scogland1@llnl.gov>2015-12-30 16:59:39 -0800
commit4ae98f8b214ea491a50aa2ddf3d995625d1b35f7 (patch)
tree454d3c984f9bd6ea10d4bd16871906cbb0055f5a /lib
parentfcdf08e4d7da824afe95445496d8b14f7bc08724 (diff)
downloadspack-4ae98f8b214ea491a50aa2ddf3d995625d1b35f7.tar.gz
spack-4ae98f8b214ea491a50aa2ddf3d995625d1b35f7.tar.bz2
spack-4ae98f8b214ea491a50aa2ddf3d995625d1b35f7.tar.xz
spack-4ae98f8b214ea491a50aa2ddf3d995625d1b35f7.zip
significant llvm update
This update significantly reworks the llvm and clang packages. The llvm package now includes variants allowing it to build and install any and all of: * clang * lldb * llvm's libunwind (why, WHY did they name it this?!?) * polly (including building it directly into the clang tools, 3.7.0 only) * clang extra tools * compiler-rt (sanitizers) * clang lto (the gold linker plugin that allows same to work) * libcxx/libcxxabi * libopenmp, also setting the default openmp runtime to same, when parameters happen this shoudl be an option of libomp or libgomp Ideally, this should have rpath setup like the gcc package does, but clang's driver has no support for specs as such, and no clearly equivalent mechanism either. If anyone has ideas on this, they would be welcome. One significant note related to gcc though, if you test this on LLNL systems, or anywhere that has multiple GCCs straddling the dwarf2 boundary and sharing a libstdc++, build a gcc with spack and use that to build clang. If you use a gcc4.8+ to build this with an older libstdc++ it will fail on missing unwind symbols because of the discrepancy. Resource handling has been changed slightly to move the unpacked archive into the target rather than use symlinks, because symlinks break certain kinds of relative paths, and orders resource staging such that nested resources are unpacked after outer ones.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/package.py22
1 files changed, 14 insertions, 8 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 118069a0a7..fe82d58394 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -36,6 +36,7 @@ README.
import os
import errno
import re
+import shutil
import time
import itertools
import subprocess
@@ -711,15 +712,20 @@ class Package(object):
target_path = join_path(self.stage.source_path, resource.destination)
link_path = join_path(target_path, value)
source_path = join_path(stage.source_path, key)
+
+ try:
+ os.makedirs(target_path)
+ except OSError as err:
+ if err.errno == errno.EEXIST and os.path.isdir(target_path):
+ pass
+ else: raise
+
+ # NOTE: a reasonable fix for the TODO above might be to have
+ # these expand in place, but expand_archive does not offer
+ # this
+
if not os.path.exists(link_path):
- # Create a symlink
- try:
- os.makedirs(target_path)
- except OSError as err:
- if err.errno == errno.EEXIST and os.path.isdir(target_path):
- pass
- else: raise
- os.symlink(source_path, link_path)
+ shutil.move(source_path, link_path)
##########
self.stage.chdir_to_source()