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.
This commit is contained in:
Tom Scogland
2015-12-30 15:37:06 -08:00
parent fcdf08e4d7
commit 4ae98f8b21
3 changed files with 175 additions and 126 deletions

View File

@@ -36,6 +36,7 @@
import os
import errno
import re
import shutil
import time
import itertools
import subprocess
@@ -711,15 +712,20 @@ def _expand_archive(stage, name=self.name):
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()