summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/fortran.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-08-20 23:14:05 +0300
committerGitHub <noreply@github.com>2019-08-20 23:14:05 +0300
commit1ea3ddc6ad7458bbcb51704ccb5ef266c5164074 (patch)
tree62540e1b93a4844a5e5c45395a63bbfa3ec419d3 /mesonbuild/compilers/fortran.py
parent0384487fc52c445d005ca1ea5b2a1c83ce56200c (diff)
parent142012ab73bf1cfedb59f539400f0c18df055ec8 (diff)
downloadmeson-1ea3ddc6ad7458bbcb51704ccb5ef266c5164074.tar.gz
Merge pull request #5681 from dcbaker/dynamic-linker-split
split dynamic linker representations from compilers
Diffstat (limited to 'mesonbuild/compilers/fortran.py')
-rw-r--r--mesonbuild/compilers/fortran.py20
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']