summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/fortran.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2025-11-12 10:05:11 -0800
committerDylan Baker <dylan@pnwbakers.com>2025-11-19 10:48:48 -0800
commit0e6fd84db2299b45d9abbe42cb461fa7e49b27c3 (patch)
tree5c33b2030593ada2b55d26e5fa48852ad89bc621 /mesonbuild/compilers/fortran.py
parent198156295899ddb5e9c91f1c889d50f27e8a7692 (diff)
downloadmeson-0e6fd84db2299b45d9abbe42cb461fa7e49b27c3.tar.gz
compilers: Remove Environment parameter from Compiler.get_language_stdlib_only_link_flags
Diffstat (limited to 'mesonbuild/compilers/fortran.py')
-rw-r--r--mesonbuild/compilers/fortran.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py
index c5e8dc549..3668f24a0 100644
--- a/mesonbuild/compilers/fortran.py
+++ b/mesonbuild/compilers/fortran.py
@@ -299,13 +299,13 @@ class GnuFortranCompiler(GnuCompiler, FortranCompiler):
def get_module_outdir_args(self, path: str) -> T.List[str]:
return ['-J' + path]
- def language_stdlib_only_link_flags(self, env: 'Environment') -> T.List[str]:
+ def language_stdlib_only_link_flags(self) -> T.List[str]:
# We need to apply the search prefix here, as these link arguments may
# be passed to a different compiler with a different set of default
# search paths, such as when using Clang for C/C++ and gfortran for
# fortran,
search_dirs: T.List[str] = []
- for d in self.get_compiler_dirs(env, 'libraries'):
+ for d in self.get_compiler_dirs(self.environment, 'libraries'):
search_dirs.append(f'-L{d}')
return search_dirs + ['-lgfortran', '-lm']
@@ -427,7 +427,7 @@ class IntelFortranCompiler(IntelGnuLikeCompiler, FortranCompiler):
def get_werror_args(self) -> T.List[str]:
return ['-warn', 'errors']
- def language_stdlib_only_link_flags(self, env: 'Environment') -> T.List[str]:
+ def language_stdlib_only_link_flags(self) -> T.List[str]:
# TODO: needs default search path added
return ['-lifcore', '-limf']
@@ -526,7 +526,7 @@ class PGIFortranCompiler(PGICompiler, FortranCompiler):
'3': default_warn_args + ['-Mdclchk'],
'everything': default_warn_args + ['-Mdclchk']}
- def language_stdlib_only_link_flags(self, env: 'Environment') -> T.List[str]:
+ def language_stdlib_only_link_flags(self) -> T.List[str]:
# TODO: needs default search path added
return ['-lpgf90rtl', '-lpgf90', '-lpgf90_rpm1', '-lpgf902',
'-lpgf90rtl', '-lpgftnrtl', '-lrt']
@@ -568,14 +568,14 @@ class ClassicFlangFortranCompiler(ClangCompiler, FortranCompiler):
'3': default_warn_args,
'everything': default_warn_args}
- def language_stdlib_only_link_flags(self, env: 'Environment') -> T.List[str]:
+ def language_stdlib_only_link_flags(self) -> T.List[str]:
# We need to apply the search prefix here, as these link arguments may
# be passed to a different compiler with a different set of default
# search paths, such as when using Clang for C/C++ and gfortran for
# fortran,
# XXX: Untested....
search_dirs: T.List[str] = []
- for d in self.get_compiler_dirs(env, 'libraries'):
+ for d in self.get_compiler_dirs(self.environment, 'libraries'):
search_dirs.append(f'-L{d}')
return search_dirs + ['-lflang', '-lpgmath']
@@ -620,10 +620,10 @@ class LlvmFlangFortranCompiler(ClangCompiler, FortranCompiler):
# https://github.com/llvm/llvm-project/issues/92459
return []
- def language_stdlib_only_link_flags(self, env: 'Environment') -> T.List[str]:
+ def language_stdlib_only_link_flags(self) -> T.List[str]:
# matching setup from ClassicFlangFortranCompiler
search_dirs: T.List[str] = []
- for d in self.get_compiler_dirs(env, 'libraries'):
+ for d in self.get_compiler_dirs(self.environment, 'libraries'):
search_dirs.append(f'-L{d}')
# does not automatically link to Fortran_main anymore after
# https://github.com/llvm/llvm-project/commit/9d6837d595719904720e5ff68ec1f1a2665bdc2f