summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/fortran.py
Commit message (Collapse)AuthorAgeFilesLines
* move OptionKey to mesonlibDylan Baker2021-01-041-2/+2
| | | | | There's starting to be a lot of things including coredata that coredata needs to itself include. putting it in mesonlib makes more sense
* use OptionKey for compiler_optionsDylan Baker2021-01-041-16/+24
|
* Add choices to OptionProxyDylan Baker2021-01-041-3/+3
| | | | they're probably not strictly needed, but it makes mypy happy.
* compilers/fortran: Add "none" to intel compielrs for standardsDylan Baker2020-11-241-2/+2
| | | | Fixes #8023
* use real pathlib moduleDylan Baker2020-11-201-1/+1
| | | | | We added the _pathlib module to work around defeciencies in python 3.5's implementation, since we now rely on 3.6 lets drop this
* compilers: define standards in the base language compilerDylan Baker2020-11-121-23/+14
| | | | | | And then update the choices in each leaf class. This way we don't end up with another case where we implicitly allow an invalid standard to be set on a compiler that doesn't have a 'std' setting currently.
* pathlib: Fix resolve() by overriding it in Python 3.5Daniel Mensinger2020-10-041-1/+1
|
* compilers/fortran: make ifort on windows signature match ICL'sDylan Baker2020-10-011-1/+1
|
* compilers/clike: Store exe_wrapper as ExternalProgramDylan Baker2020-10-011-1/+1
| | | | Which is what other languages do.
* compilers/fortran: fix has_multi_*_argumentsDylan Baker2020-10-011-19/+4
| | | | | | The implementation of the link variant was what should have been the compiler variant, and there was no valid compiler variant, which meant it was getting C code.
* compilers/fortran: add type annotationsDylan Baker2020-10-011-92/+134
|
* compilers: move get_dependency_gen_args to base CompilerDylan Baker2020-10-011-3/+0
| | | | | | So that every subclass doesn't have to reimplement it. Especially since the Gnu implementation moved out of the CCompiler and into the GnuLikeCompiler mixin
* compilers: make is_cross part of the base Compiler classDylan Baker2020-09-241-3/+3
| | | | | | | Every class needs to set this, so it should be part of the base. For classes that require is_cross, the positional argument remains in their signature. For those that don't, they just allow the base class to set their value to it's default of False.
* compilers/mixins/clike: fix mypy issuesDylan Baker2020-09-241-1/+1
|
* add Nvidia HPC SDK compilersMichael Hirsch, Ph.D2020-07-131-0/+17
|
* compilers: add fetching of define list for clangYevhenii Kolesnikov2020-05-221-1/+1
| | | | | | | | | | | | | | | Simmilar to gcc, the list of pre-processor defines can be fetched with `-dM -E` option. The way cpu_family is determined on linux relies on this list. Fixes incorrect value of cpu_family on linux, when crosscompiling: ``` CC="clang -m32" meson ./build ``` Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com> Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
* gfortran: Fix has_header implementation with GCC 10Nirbheek Chauhan2020-05-141-0/+12
| | | | | | | __has_include is not accepted as a pre-processor directive in Fortran code since GCC 10. Closes https://github.com/mesonbuild/meson/issues/7017
* Compiler options per langJohn Ericson2020-04-201-12/+24
| | | | | | | | | | | A current rather untyped storage of options is one of the things that contributes to the options code being so complex. This takes a small step in synching down by storing the compiler options in dicts per language. Future work might be replacing the langauge strings with an enum, and defaultdict with a custom struct, just like `PerMachine` and `MachineChoice`.
* quality / test: Fortran type hintingMichael Hirsch, Ph.D2020-04-051-15/+16
| | | | enhance fortran args tests
* compilers: Fix accidental coredata mutationsOle André Vadla Ravnås2020-03-291-1/+2
|
* Fix missing 'defines' argumet for Elbrus compilermakise-homura2020-01-271-1/+1
| | | | ...But somehow it still remains in C++ compiler.
* types: import typing as T (fixes #6333)Daniel Mensinger2020-01-081-9/+9
|
* compilers: Make get_display_language a class or static methodDylan Baker2019-12-121-3/+0
| | | | | | | | Currently this is done at the instance level, but we need it at the class level to allow compiler "lang" args to be gotten early enough. This patch also removes a couple of instance of branch/leaf classes providing their own implementation that is identical to the Compiler version.
* compilers: move language attribute to the class levelDylan Baker2019-12-121-1/+2
| | | | | We know that if a compiler class inherits CCompiler it's language will be C, so doing this at the class level makes more sense.
* lgtm: Fix Module imported with `import` and `import from`Daniel Mensinger2019-12-051-7/+6
|
* intel/intel-cl: use appropriate buildtype optionsMichael Hirsch, Ph.D2019-12-041-12/+1
| | | | | | | | This puts appropriate default options across buildtype for Intel and Intel-Cl compilers, for C, C++ and Fortran. Prior to this PR, the behavior of Intel compilers vs. GNUlike was not the same, in particular, debug traceback available by default for GNUlike compilers was not present with Intel compilers.
* complete gfortran/intel/intel-cl fortran_std testMichael Hirsch, Ph.D2019-11-251-1/+53
|
* fortran: sync implicit-none args for intel,pgi,gfortranMichael Hirsch, Ph.D2019-11-181-2/+8
| | | | | also, find intel-cl submodule .smod name pattern. this would fix intermittent failures of ninja to resolve submodule file dependencies.
* fortran: note there is no has_function for FortranMichael Hirsch, Ph.D2019-11-181-1/+7
| | | | | | | | It would be very challenging if not futile to make has_function work for Fortran. The meson.get_compiler('fortran').links() works very well instead. As a reference, CMake's check_fortran_function_exists is completely broken in general. This change raises a useful MesonException instead of giving bizarre errors.
* bugfix: fortran compiler assertionerror from 0c22798Michael Hirsch, Ph.D2019-10-311-5/+5
|
* intel-cl: correct argument orderMichael Hirsch, Ph.D2019-10-101-2/+2
|
* compilers: replace CompilerType with MachineInfoDylan Baker2019-10-071-30/+65
| | | | | | Now that the linkers are split out of the compilers this enum is only used to know what platform we're compiling for. Which is what the MachineInfo class is for
* compilers: Move the compiler argument to proxy linker flags to the compiler ↵Dylan Baker2019-08-301-0/+6
| | | | | | | | | | | | class Instead of the DynamicLinker returning a hardcoded value like `-Wl,-foo`, it now is passed a value that could be '-Wl,', or could be something '-Xlinker=' This makes a few things cleaner, and will make it possible to fix using clang (not clang-cl) on windows, where it invokes either link.exe or lld-link.exe instead of a gnu-ld compatible linker.
* compilers: Dispatch to dynamic linker classDylan Baker2019-08-141-7/+1
| | | | | Most of the cuda code is from Olexa Bilaniuk. Most of the PGI code is from Michael Hirsc
* compilers/fortran: Make ifort (windows) proxy extra args to CompilerDylan Baker2019-08-141-2/+2
|
* compilers/fortran: fix ifort (linux, mac) dependency generationDylan Baker2019-08-141-1/+7
| | | | | | | Ifort can generate dependency information (.d files), it just does it differently than GNU compilers do. This also fixes a bug caused by adding the dependency generation commands to the GNULike class later in this series.
* Flang: add links for non-flang main programMichael Hirsch, Ph.D2019-07-291-0/+3
|
* compilers: split pgi compiler out of compilers moduleDylan Baker2019-07-151-1/+1
|
* compilers: put elbrus in mixinsDylan Baker2019-07-151-1/+1
|
* compilers: Put clang mixin in a moduleDylan Baker2019-07-151-1/+1
|
* compilers: Put Intel compiler classes into the mixins folderDylan Baker2019-07-151-2/+1
|
* compilers: split gnu and gnulike compilers out of compilersDylan Baker2019-07-151-5/+4
| | | | | I debated a bit whether both classes really belong in the same module, and decided that they do because the share a number of helpers.
* compilers: Move clike into a mixins directoryDylan Baker2019-07-151-1/+1
| | | | | | | The compilers module is rather large and confusing, with spaghetti dependencies going every which way. I'm planning to start breaking out the internal representations into a mixins submodule, for things that shouldn't be required outside of the compilers module itself.
* known Python 3.5 on windows workaround for subprocess(cwd=str(Path))Michael Hirsch, Ph.D2019-06-241-1/+2
|
* windows ifort can't do shared_library sanelyMichael Hirsch, Ph.D2019-06-241-4/+2
|
* correct missing argument for IntelClFortranCompilerMichael Hirsch, Ph.D2019-06-241-9/+11
| | | | | | ifort passes all tests cleanup logic
* Purge `is_cross` and friends without changing user interfacesJohn Ericson2019-06-091-28/+24
| | | | | | | | | | | | In most cases instead pass `for_machine`, the name of the relevant machines (what compilers target, what targets run on, etc). This allows us to use the cross code path in the native case, deduplicating the code. As one can see, environment got bigger as more information is kept structured there, while ninjabackend got a smaller. Overall a few amount of lines were added, but the hope is what's added is a lot simpler than what's removed.
* compilers/fortran: Fix all has_argument methods in mesonDylan Baker2019-05-161-0/+20
| | | | | | Apparently we have no tests for this because this is broken pretty badly. This extends the basic test to actually check for the correct free-form argument and thus test this.
* compilers: Add basic ICL abstractionsDylan Baker2019-05-131-1/+33
|
* compilers: rename IntelCompiler to IntelGnuLikeCompilerDylan Baker2019-05-131-4/+4
| | | | | | | | The Intel compiler is strange. On Linux and macOS it's called ICC, and it tries to mostly behave like gcc/clang. On Windows it's called ICL, and tries to behave like MSVC. This makes the code that's used to implement ICC support useless for supporting ICL, because their command line interfaces are completely different.