Add stdcxx_libs for PGI and Cray compilers (#22491)

This commit is contained in:
Sergey Kosukhin 2021-03-23 21:19:03 +01:00 committed by GitHub
parent 45e076dd20
commit a1aec1450b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View file

@ -112,3 +112,9 @@ def fc_pic_flag(self):
if self.is_clang_based: if self.is_clang_based:
return "-fPIC" return "-fPIC"
return "-h PIC" return "-h PIC"
@property
def stdcxx_libs(self):
# Cray compiler wrappers link to the standard C++ library
# without additional flags.
return ()

View file

@ -88,3 +88,7 @@ def c11_flag(self):
'the C11 standard', 'the C11 standard',
'c11_flag', 'c11_flag',
'< 15.3') '< 15.3')
@property
def stdcxx_libs(self):
return ('-pgc++libs',)

View file

@ -389,6 +389,7 @@ def test_cce_flags():
supported_flag_test("cxx_pic_flag", "-fPIC", "cce@9.1.0") supported_flag_test("cxx_pic_flag", "-fPIC", "cce@9.1.0")
supported_flag_test("f77_pic_flag", "-fPIC", "cce@9.1.0") supported_flag_test("f77_pic_flag", "-fPIC", "cce@9.1.0")
supported_flag_test("fc_pic_flag", "-fPIC", "cce@9.1.0") supported_flag_test("fc_pic_flag", "-fPIC", "cce@9.1.0")
supported_flag_test("stdcxx_libs", (), "cce@1.0")
supported_flag_test("debug_flags", ['-g', '-G0', '-G1', '-G2', '-Gfast'], supported_flag_test("debug_flags", ['-g', '-G0', '-G1', '-G2', '-Gfast'],
'cce@1.0') 'cce@1.0')
@ -612,6 +613,7 @@ def test_pgi_flags():
supported_flag_test("cxx_pic_flag", "-fpic", "pgi@1.0") supported_flag_test("cxx_pic_flag", "-fpic", "pgi@1.0")
supported_flag_test("f77_pic_flag", "-fpic", "pgi@1.0") supported_flag_test("f77_pic_flag", "-fpic", "pgi@1.0")
supported_flag_test("fc_pic_flag", "-fpic", "pgi@1.0") supported_flag_test("fc_pic_flag", "-fpic", "pgi@1.0")
supported_flag_test("stdcxx_libs", ("-pgc++libs",), "pgi@1.0")
supported_flag_test("debug_flags", ['-g', '-gopt'], 'pgi@1.0') supported_flag_test("debug_flags", ['-g', '-gopt'], 'pgi@1.0')
supported_flag_test("opt_flags", ['-O', '-O0', '-O1', '-O2', '-O3', '-O4'], supported_flag_test("opt_flags", ['-O', '-O0', '-O1', '-O2', '-O3', '-O4'],
'pgi@1.0') 'pgi@1.0')