Commit Graph

63 Commits

Author SHA1 Message Date
Dr Owain Kenway
441401bb8b llvm: don't build CppBackend for flang versions of llvm (#11841)
The version of LLVM used by flang is new enough that CppBackend doesn't exist.  Unfortunately, `flang-xxxxxxxx` is seen as < `3.9.0` by the version check.  

* add a special case for `flang` versions.
2019-06-30 17:04:29 -07:00
Michael Kuhn
d2de78ab00 fenics, llvm: Fix package names being overriden (#11879)
Setting name within the package class allows overriding the package
name, which both packages do using several for loops.

Fixes #11789
2019-06-28 15:59:19 +02:00
Chuck Atkins
e4ce4e5c2c llvm: Adjust default supported targets
The default install for llvm should just be the common typical case, i.e.
support for local host and cpu architectures.  Enablingsupport for the wide
array of auxiliary architectures should be explicit rather than implicit.
2019-05-08 04:36:43 +09:00
Chuck Atkins
f44443ed3a llvm: depend on python only when +python (#11348)
Based on the LLVM documentation [1], Python is used to run the automated
test suite. Therefore is it always a dependency for LLVM. However, if
build without Python (~python), we limit it to a build time dependency.

Note that py-lit is not added as a spack dependency even though it is
available as a spack package. This is because it is already included
in llvm and llvm is difficult to configure using an external py-lit
(several CMake variables to set correctly). Additionally, having
py-lit as a spack dependency adds Python as a runtime dependency
for llvm even though it is not required at runtime.

[1] https://llvm.org/docs/GettingStarted.html#requirements
2019-05-02 16:21:06 -04:00
Federico Ficarelli
e64ee7e1be Prevent building llvm@8: with an incompatilble gcc (#11220) 2019-04-18 16:58:41 +02:00
sknigh
e372464611 Add llvm 8.0.0 (#11197) 2019-04-17 09:31:42 -05:00
Omar Padron
bf03edb51b LLVM package: disable CUDA (#10858)
This avoids using a system-installed CUDA package. In the future a
variant can be added to allow using Spack-installed CUDA, but for
now CUDA support is always disabled.
2019-03-25 19:43:18 -05:00
Chuck Atkins
6535eae5c7 llvm: various updates (#10427)
* llvm: Bump version to 7.0.1

* llvm: Added perl-data-dumper build dependency for openmp

* llvm: Enable exception handling and RTTI

Useful to have turned on in general with RTTI but also necessary
to workaround some lldb stability issues with some versions of
libstdc++.
2019-01-29 00:32:30 +01:00
Todd Gamblin
6f50cd52ed copyright: update license headers for 2013-2019 copyright. 2019-01-01 00:44:28 -08:00
Gary Klimowicz
a1d651e80f flang, llvm, pgmath: Add release for 2018-09-21 (#10224) 2018-12-31 11:50:04 -06:00
sknigh
a7bb03c7a3 LLVM: add older version and gcc constraint (#9614)
- Added v 5.0.2
- Added conflict with gcc 8 for versions that do not build
2018-10-25 18:05:26 -07:00
Geoffrey Oxberry
38111dc68e llvm: rename "trunk" version to "develop" (#9320) 2018-10-18 13:22:56 -07:00
Todd Gamblin
eea786f4e8 relicense: replace LGPL headers with Apache-2.0/MIT SPDX headers
- remove the old LGPL license headers from all files in Spack
- add SPDX headers to all files
  - core and most packages are (Apache-2.0 OR MIT)
  - a very small number of remaining packages are LGPL-2.1-only
2018-10-17 14:42:06 -07:00
sknigh
2bc895083b Added llvm 7.0.0 (#9296) 2018-09-20 17:21:42 +02:00
Adam J. Stewart
73c978ddd9 install_tree, copy_tree can install into existing directory structures (#8289)
Replace use of `shutil.copytree` with `copy_tree` and `install_tree` functions in `llnl.util.filesystem`.

- `copy_tree` copies without setting permissions.  It should be used to copy files around in the build directory.
- `install_tree` copies files and sets permissions.  It should be used to copy files into the installation directory.
- `install` and `copy` are analogous single-file functions.
- add more extensive tests for these functions
- update packages to use these functions.
2018-08-15 09:30:09 -07:00
Tin Huynh
eb39d0c729 Package/flang: Updated to use own version of llvm (#8766)
Flang now uses its own version of llvm and clang (called flang-driver). This is
handled by adding flang-specific versions of the LLVM package and updates flang
to depend on those versions.
2018-08-03 20:35:09 -04:00
Neil Flood
3494c6e403 Updated llvm to version 6.0.1. The previous 6.0.0 had an incorrectly … (#8801)
* Updated llvm to version 6.0.1. The previous 6.0.0 had an incorrectly declared symbol, discussed at https://reviews.llvm.org/D44140, which, amongst other things, broke py-numba. This version works fine with py-numba.

* Flag the conflict between py-numba and llvm@6.0.0

* Removed a single trailing space to satisfy checks
2018-07-26 17:47:18 -05:00
scheibelp
79669ac647
llvm: replace @when with internal check in @run_before (#8092)
Fixes #8088

#7012 added a @when condition for a @run_before check to constrain
that check to only run on Darwin. @when is intended to be used to
choose one of several different implementations of a given function
and cannot be used to conditionally deactivate a check altogether.

This replaces the external decorator with a check that executes at
the beginning of the function.
2018-05-11 12:32:26 -07:00
Geoffrey Oxberry
7dfc0278e7 llvm+lldb plaform=darwin: check for lldb_codesign certificate (#7012)
* llvm+lldb plaform=darwin: check for lldb_codesign

Building LLVM with LLDB requires that the "lldb_codesign" code
certificate be created (see
https://llvm.org/svn/llvm-project/lldb/trunk/docs/code-signing.txt for
details). This commit checks for this certificate on Darwin if LLDB is
to be built, and returns an informative error message if this
certificate is unavailable.
2018-05-09 15:04:06 +02:00
Todd Gamblin
54f97d1dec
Update copyright on LLNL files for 2018. (#7592) 2018-03-24 12:13:52 -07:00
Gregory Lee
be3f08d0de llvm+python+lldb depends on py-six for versions 5 and up (#7056) 2018-03-22 15:42:41 -05:00
Stephen McDowell
6f76c2124a llvm 6.0.0 released as stable (#7459)
Relase notes: http://releases.llvm.org/6.0.0/docs/ReleaseNotes.html
2018-03-13 11:34:19 +01:00
healther
3683ab87b5 llvm package: update python dependency (#7100)
llvm versions >= 5 can use python 3.x
2018-02-26 10:33:40 -08:00
Mike Pozulp
8157f978b0 llvm and llvm-lld package updates (#7313)
* Combined llvm and llvm-lld: removed the separate llvm-lld package
  and added llvm-lld as an optional add on to the llvm package (the
  way several other llvm tools are maintained e.g. lldb)
* Added more lld hashes to llvm package
* The 'CppBackend' target doesn't exist for version 3.9.0 or later
  so exclude it for later versions
* Was incorrectly specifying 'sparc' as a target for the 'sparc'
  architecture - needed to specify 'Sparc'
* Fix issue #7248 building llvm: don't make the LLVMDemangle target
  for llvm < 4.0.0
2018-02-23 19:50:23 -08:00
Geoffrey Oxberry
9d84e7eb5c llvm: add version 5.0.1 (#6957) 2018-01-20 21:09:31 +01:00
Andrey Prokopenko
937f68c359 clang,flang: update CC, CXX environment in installation module (#6737) 2017-12-22 07:32:10 +01:00
Todd Gamblin
05fa302655
Replace github.com/llnl/spack with github.com/spack/spack (#6142)
We moved to a new GitHub org! Now make the code and docs reflect that.
2017-11-04 17:08:04 -07:00
Patrick Gartung
8a812294e0 Preinstall some llvm shared libraries so tblgen will work. (#5988) 2017-10-31 18:34:33 -06:00
Johann Klähn
306f536138 Add option to install clang python bindings to llvm (#5774) 2017-10-26 01:46:03 +02:00
Ondřej Čertík
89b0a09de0 Make clang use libc++ by default (#5943)
Since LLVM 3.9 Clang can use the libc++ library by default using the
CLANG_DEFAULT_CXX_STDLIB cmake configuration variable, without having to
specify the -stdlib=libc++ option on the clang++ command line.

This commit makes clang++ use libc++ by default for LLVM 3.9 and later if the
libcxx variant is on.

Fixes #5942.
2017-10-25 16:19:32 -06:00
Johann Klähn
6c67de48e8 Update llvm to version 5.0.0 (#5773) 2017-10-15 13:04:40 -06:00
Andrey Prokopenko
6168b7fda8 llvm: patch lldb for gcc-7 (#5239) 2017-09-24 10:24:36 +02:00
Michael Kuhn
84ae7872d3 Update copyright notices for 2017 (#5295) 2017-09-06 17:44:16 -10:00
Massimiliano Culpo
dec6b609d8 Updated llvm to version 4.0.1 Fixed indentation of dict literal (#5272) 2017-09-02 07:51:27 -05:00
scheibelp
5342ecf364 Set default cmake build_type to Release for llvm
Override CMake "build_type" variant to default to "Release" for
llvm package.
2017-09-01 10:32:04 -07:00
Adam J. Stewart
07aec4366f Add universal build_type variant to CMakePackage (#4797)
* Add universal build_type variant to CMakePackage
* Override build_type in some packages with different possible values
* Remove reference to no longer existent debug variant
* Update CBTF packages with new build_type variant
* Keep note on build size of LLVM
2017-07-25 16:34:43 -07:00
becker33
f962aba6ce Allow packages to control handling of compiler flags (#4421)
* Initial work on flag trapping using functions called <flag>_handler and default_flag_handler

* Update packages so they do not obliterate flags

* Added append to EnvironmentModifications class

* changed EnvironmentModifications to have append_flags method

* changed flag_val to be a tuple

* Increased test coverage

* added documentation of flag handling
2017-07-19 20:12:00 -07:00
Todd Gamblin
cac4362f64 Make LICENSE recognizable by GitHub. (#4598) 2017-06-24 22:22:55 -07:00
Adam J. Stewart
ce3ab503de Python command, libraries, and headers (#3367)
## Motivation

Python installations are both important and unfortunately inconsistent. Depending on the Python version, OS, and the strength of the Earth's magnetic field when it was installed, the name of the Python executable, directory containing its libraries, library names, and the directory containing its headers can vary drastically. 

I originally got into this mess with #3274, where I discovered that Boost could not be built with Python 3 because the executable is called `python3` and we were telling it to use `python`. I got deeper into this mess when I started hacking on #3140, where I discovered just how difficult it is to find the location and name of the Python libraries and headers.

Currently, half of the packages that depend on Python and need to know this information jump through hoops to determine the correct information. The other half are hard-coded to use `python`, `spec['python'].prefix.lib`, and `spec['python'].prefix.include`. Obviously, none of these packages would work for Python 3, and there's no reason to duplicate the effort. The Python package itself should contain all of the information necessary to use it properly. This is in line with the recent work by @alalazo and @davydden with respect to `spec['blas'].libs` and friends.

## Prefix

For most packages in Spack, we assume that the installation directory is `spec['python'].prefix`. This generally works for anything installed with Spack, but gets complicated when we include external packages. Python is a commonly used external package (it needs to be installed just to run Spack). If it was installed with Homebrew, `which python` would return `/usr/local/bin/python`, and most users would erroneously assume that `/usr/local` is the installation directory. If you peruse through #2173, you'll immediately see why this is not the case. Homebrew actually installs Python in `/usr/local/Cellar/python/2.7.12_2` and symlinks the executable to `/usr/local/bin/python`. `PYTHONHOME` (and presumably most things that need to know where Python is installed) needs to be set to the actual installation directory, not `/usr/local`.

Normally I would say, "sounds like user error, make sure to use the real installation directory in your `packages.yaml`". But I think we can make a special case for Python. That's what we decided in #2173 anyway. If we change our minds, I would be more than happy to simplify things.

To solve this problem, I created a `spec['python'].home` attribute that works the same way as `spec['python'].prefix` but queries Python to figure out where it was actually installed. @tgamblin Is there any way to overwrite `spec['python'].prefix`? I think it's currently immutable.

## Command

In general, Python 2 comes with both `python` and `python2` commands, while Python 3 only comes with a `python3` command. But this is up to the OS developers. For example, `/usr/bin/python` on Gentoo is actually Python 3. Worse yet, if someone is using an externally installed Python, all 3 commands may exist in the same directory! Here's what I'm thinking:

If the spec is for Python 3, try searching for the `python3` command.
If the spec is for Python 2, try searching for the `python2` command.
If neither are found, try searching for the `python` command.

## Libraries

Spack installs Python libraries in `spec['python'].prefix.lib`. Except on openSUSE 13, where it installs to `spec['python'].prefix.lib64` (see #2295 and #2253). On my CentOS 6 machine, the Python libraries are installed in `/usr/lib64`. Both need to work.

The libraries themselves change name depending on OS and Python version. For Python 2.7 on macOS, I'm seeing:
```
lib/libpython2.7.dylib
```
For Python 3.6 on CentOS 6, I'm seeing:
```
lib/libpython3.so
lib/libpython3.6m.so.1.0
lib/libpython3.6m.so -> lib/libpython3.6m.so.1.0
```
Notice the `m` after the version number. Yeah, that's a thing.

## Headers

In Python 2.7, I'm seeing:
```
include/python2.7/pyconfig.h
```
In Python 3.6, I'm seeing:
```
include/python3.6m/pyconfig.h
```
It looks like all Python 3 installations have this `m`. Tested with Python 3.2 and 3.6 on macOS and CentOS 6

Spack has really nice support for libraries (`find_libraries` and `LibraryList`), but nothing for headers. Fixed.
2017-04-29 17:24:13 -07:00
Adam J. Stewart
2a04fdca52 Convert LLVM to CMakePackage, update cmake dependency version (#3940)
* Convert LLVM to CMakePackage, update cmake dependency version

* Remove unused import
2017-04-21 18:38:07 -05:00
Jimmy Tang
f86ed1e34d Fix for llvm 4.0.0 on centos (#3904)
* Fix for llvm 4.0.0 on centos

This addresses https://github.com/LLNL/spack/issues/3791

* Only enable this option if on linux

* Change condition to satisfy standard
2017-04-21 11:29:41 -05:00
Jean-Paul Pelteret
c6777ddf74 Update LLVM to version 4.0.0 (#3683)
* Update LLVM to version 4.0.0

* Add arguments to prevent lldb, polly building when using ~<variant>
2017-04-07 13:15:14 -05:00
Erik Schnetter
7e7045e0ca llvm: Install utilities into libexec (#3516) 2017-03-22 09:01:10 -07:00
Erik Schnetter
75c6c9f1ee llvm: Don’t copy “prefix/bin” into “prefix” during install (#3460) 2017-03-20 20:46:29 -05:00
Adam J. Stewart
9d0a3c6b05 Fix deptype of various dependencies on Python packages (#3486) 2017-03-18 15:20:16 -05:00
Gregory Lee
ccb07dc25e added archer OpenMP race detector and its deps (#3030) 2017-02-04 15:42:22 -08:00
Tom Scogland
95c04f3ab1 llvm: add 3.9.1, only download necessary resources (#3015)
* llvm: add 3.9.1, only download necessary resources

* sacrifice some spaces on the altar of flake8 the vengeful and merciless
2017-02-03 14:04:36 -08:00
Kelly Thompson
621a4d637d Provide newer versions of llvm (3.8.1, 3.9.0) (#1765)
* Provide new versions of llvm.

+ Provide file list and md5 hashes for 3.8.1 and 3.9.0.
+ Clean up indentation for the 'releases' data structure to improve
  consistency.

* Adding a block of code to the 'resources' structure for cfe.

* Merge cfe and clang resources into single entity.
2016-10-02 18:50:42 -07:00
Massimiliano Culpo
ea446c0f0e lmod : added support for the creation of hierarchical lua module files (#1723)
Includes :
- treatment of a generic hierarchy (i.e. lapack + mpi + compiler)
- possibility to specify which compilers are to be considered Core
- correct treatment of the 'family' directive
- unit tests for most new features
2016-09-20 02:26:25 -07:00
Todd Gamblin
240f1fd223 Spack packages now PEP8 compliant. 2016-08-10 16:33:39 -07:00