diff options
Diffstat (limited to 'mesonbuild/compilers/fortran.py')
| -rw-r--r-- | mesonbuild/compilers/fortran.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py index c10e2ca3a..30ec6fea2 100644 --- a/mesonbuild/compilers/fortran.py +++ b/mesonbuild/compilers/fortran.py @@ -11,9 +11,11 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +from pathlib import Path from typing import List import subprocess, os -from pathlib import Path +import typing from .compilers import ( CompilerType, @@ -22,8 +24,7 @@ from .compilers import ( ) from .mixins.clike import CLikeCompiler from .mixins.gnu import ( - GnuCompiler, apple_buildtype_linker_args, gnulike_buildtype_args, - gnulike_buildtype_linker_args, gnu_optimization_args, + GnuCompiler, gnulike_buildtype_args, gnu_optimization_args, ) from .mixins.intel import IntelGnuLikeCompiler, IntelVisualStudioLikeCompiler from .mixins.clang import ClangCompiler @@ -99,11 +100,6 @@ class FortranCompiler(CLikeCompiler, Compiler): def get_debug_args(self, is_debug): return clike_debug_args[is_debug] - def get_buildtype_linker_args(self, buildtype): - if is_osx(): - return apple_buildtype_linker_args[buildtype] - return gnulike_buildtype_linker_args[buildtype] - def get_dependency_gen_args(self, outtarget, outfile): return [] @@ -256,6 +252,10 @@ class IntelFortranCompiler(IntelGnuLikeCompiler, FortranCompiler): def language_stdlib_only_link_flags(self): return ['-lifcore', '-limf'] + def get_dependency_gen_args(self, outtarget: str, outfile: str) -> typing.List[str]: + return ['-gen-dep=' + outtarget, '-gen-depformat=make'] + + class IntelClFortranCompiler(IntelVisualStudioLikeCompiler, FortranCompiler): file_suffixes = ['f90', 'f', 'for', 'ftn', 'fpp'] @@ -270,8 +270,8 @@ class IntelClFortranCompiler(IntelVisualStudioLikeCompiler, FortranCompiler): 'custom': [], } - def __init__(self, exelist, for_machine: MachineChoice, version, is_cross, target: str, exe_wrapper=None): - FortranCompiler.__init__(self, exelist, for_machine, version, is_cross, exe_wrapper) + def __init__(self, exelist, for_machine: MachineChoice, version, is_cross, target: str, exe_wrapper=None, **kwargs): + FortranCompiler.__init__(self, exelist, for_machine, version, is_cross, exe_wrapper, **kwargs) IntelVisualStudioLikeCompiler.__init__(self, target) default_warn_args = ['/warn:general', '/warn:truncated_source'] |
