diff options
author | Nichols A. Romero <naromero77@users.noreply.github.com> | 2020-04-08 20:32:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-08 20:32:56 -0500 |
commit | bf4eec94ca9055736f10b90b764efa48fe879d26 (patch) | |
tree | 46eb23a1a96bf9545beb3666fa93b6803ed41954 /var | |
parent | c5b625ca90647ccfb4b388a82e2023e5c569eff4 (diff) | |
download | spack-bf4eec94ca9055736f10b90b764efa48fe879d26.tar.gz spack-bf4eec94ca9055736f10b90b764efa48fe879d26.tar.bz2 spack-bf4eec94ca9055736f10b90b764efa48fe879d26.tar.xz spack-bf4eec94ca9055736f10b90b764efa48fe879d26.zip |
F18 update April 2020 (#15930)
* Update dependencies and support variant for Fortran Intermediate Representation.
* Add Cmake flags that toggle Fortran Intermediate Representation on/off. Exclude Flang tests for now.
* f18+fir variant needs next release of llvm or master.
* Only build tests if you are pass in --test to spack install
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/f18/package.py | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/f18/package.py b/var/spack/repos/builtin/packages/f18/package.py index b766a8f17c..699cfde6c6 100644 --- a/var/spack/repos/builtin/packages/f18/package.py +++ b/var/spack/repos/builtin/packages/f18/package.py @@ -21,9 +21,12 @@ class F18(CMakePackage): description='The build type to build', values=('Debug', 'Release', 'RelWithDebInfo')) + variant('fir', default='False', description='Build with support for FIR') + # Dependencies depends_on('cmake@3.9.0:', type='build') - depends_on('llvm+clang@7:') + depends_on('llvm+clang@9:', when='~fir') + depends_on('llvm+clang+mlir@10.0.1:', when='+fir') # Conflicts compiler_warning = 'F18 requires a compiler with support for C++17' @@ -31,3 +34,23 @@ class F18(CMakePackage): conflicts('%gcc@:7.1', msg=compiler_warning) conflicts('%intel', msg=compiler_warning) conflicts('%pgi', msg=compiler_warning) + + def cmake_args(self): + spec = self.spec + args = ['-DLLVM_DIR=%s' % self.spec['llvm'].prefix.lib.cmake.llvm] + # Tests have linking errors with older compilers (before GCC 8.x). + # Don't build tests for now. + # https://bugs.llvm.org/show_bug.cgi?id=45463 + if self.run_tests: + args.append('-DFLANG_INCLUDE_TESTS:BOOL=ON') + else: + args.append('-DFLANG_INCLUDE_TESTS:BOOL=OFF') + + if '+fir' in spec: + args.append('-DLINK_WITH_FIR:BOOL=ON') + args.append( + '-DMLIR_DIR=%s' % self.spec['llvm'].prefix.lib.cmake.mlir) + else: + args.append('-DLINK_WITH_FIR:BOOL=OFF') + + return args |