summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomoki, Karatsu <49965247+t-karatsu@users.noreply.github.com>2020-11-19 19:09:34 +0900
committerGitHub <noreply@github.com>2020-11-19 11:09:34 +0100
commit8f3594564c1b855ea1b135676ae21560e547f9a7 (patch)
treefa4d09774e21e00ac659cf089747a94aabecc29f
parent1b7a5e53a628e67e5d728a87f41b3b2612877522 (diff)
downloadspack-8f3594564c1b855ea1b135676ae21560e547f9a7.tar.gz
spack-8f3594564c1b855ea1b135676ae21560e547f9a7.tar.bz2
spack-8f3594564c1b855ea1b135676ae21560e547f9a7.tar.xz
spack-8f3594564c1b855ea1b135676ae21560e547f9a7.zip
fujitsu compiler: added / fixed support for compiler flags (#19967)
Added flags for: - Debug symbols - C++17 standard Fixed the list of flags for generic optimizations
-rw-r--r--lib/spack/spack/compilers/fj.py10
-rw-r--r--lib/spack/spack/test/compilers/basics.py4
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/spack/spack/compilers/fj.py b/lib/spack/spack/compilers/fj.py
index c2cc66e110..fb1b70df70 100644
--- a/lib/spack/spack/compilers/fj.py
+++ b/lib/spack/spack/compilers/fj.py
@@ -35,8 +35,12 @@ class Fj(spack.compiler.Compiler):
return "-v"
@property
+ def debug_flags(self):
+ return "-g"
+
+ @property
def opt_flags(self):
- return ['-O', '-O0', '-O1', '-O2', '-O3', '-O4']
+ return ['-O0', '-O1', '-O2', '-O3', '-Ofast']
@property
def openmp_flag(self):
@@ -55,6 +59,10 @@ class Fj(spack.compiler.Compiler):
return "-std=c++14"
@property
+ def cxx17_flag(self):
+ return "-std=c++17"
+
+ @property
def c99_flag(self):
return "-std=c99"
diff --git a/lib/spack/spack/test/compilers/basics.py b/lib/spack/spack/test/compilers/basics.py
index 78d8484b3b..c33d878e0f 100644
--- a/lib/spack/spack/test/compilers/basics.py
+++ b/lib/spack/spack/test/compilers/basics.py
@@ -471,14 +471,16 @@ def test_fj_flags():
supported_flag_test("cxx98_flag", "-std=c++98", "fj@4.0.0")
supported_flag_test("cxx11_flag", "-std=c++11", "fj@4.0.0")
supported_flag_test("cxx14_flag", "-std=c++14", "fj@4.0.0")
+ supported_flag_test("cxx17_flag", "-std=c++17", "fj@4.0.0")
supported_flag_test("c99_flag", "-std=c99", "fj@4.0.0")
supported_flag_test("c11_flag", "-std=c11", "fj@4.0.0")
supported_flag_test("cc_pic_flag", "-KPIC", "fj@4.0.0")
supported_flag_test("cxx_pic_flag", "-KPIC", "fj@4.0.0")
supported_flag_test("f77_pic_flag", "-KPIC", "fj@4.0.0")
supported_flag_test("fc_pic_flag", "-KPIC", "fj@4.0.0")
- supported_flag_test("opt_flags", ['-O', '-O0', '-O1', '-O2', '-O3', '-O4'],
+ supported_flag_test("opt_flags", ['-O0', '-O1', '-O2', '-O3', '-Ofast'],
'fj@4.0.0')
+ supported_flag_test("debug_flags", "-g", "fj@4.0.0")
def test_gcc_flags():