summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/fortran.py
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* compilers: Split C-Like functionality into a mixin classesDylan Baker2019-05-031-172/+5
| | | | | | | | | | | | | | | | | Currently C++ inherits C, which can lead to diamond problems. By pulling the code out into a standalone mixin class that the C, C++, ObjC, and Objc++ compilers can inherit and override as necessary we remove one source of diamonding. I've chosen to split this out into it's own file as the CLikeCompiler class is over 1000 lines by itself. This also breaks the VisualStudio derived classes inheriting from each other, to avoid the same C -> CPP inheritance problems. This is all one giant patch because there just isn't a clean way to separate this. I've done the same for Fortran since it effectively inherits the CCompiler (I say effectively because was it actually did was gross beyond explanation), it's probably not correct, but it seems to work for now. There really is a lot of layering violation going on in the Compilers, and a really good scrubbing would do this code a lot of good.
* Merge pull request #4952 from mensinda/cacheCompilesDylan Baker2019-05-021-10/+10
|\ | | | | Cache compilers.compile() in coredata
| * Disable cache for dependenciesDaniel Mensinger2019-04-281-4/+4
| |
| * Add disable_cache to the fortran compilerDaniel Mensinger2019-04-281-6/+6
| |
* | per-target manual specification of link_languageMichael Hirsch, Ph.D2019-05-021-1/+3
| |
* | better default order for fotran compiler searchMichael Hirsch, Ph.D2019-04-271-2/+2
|/ | | | | | | | correct PGI windows detection doc cleanup PGI detect
* fortran: fix compile.links() when passing dependenciesTamer Fahmy2019-04-221-1/+1
| | | | | With dependencies specifed, mode='compile' causes it to ignore the link arguments and thereby always fails.
* BUGFIX: don't crash Meson on bad existing exe file for Fortran sanity checkMichael Hirsch, Ph.D2019-04-051-11/+24
|
* Sanity check with external argsJohn Ericson2019-03-271-2/+13
| | | | | | | | | Previously cross, but not native, external args were used. Then in d451a4bd97f827bb492fd0c0e357cb20b6056ed9 the cross special cases were removed, so external args are never used. This commit switches that so they are always used. Sanity checking works just the same as compiler checks like has header / has library.
* more efficient submodule filenamingMichael Hirsch, Ph.D2019-03-251-3/+4
|
* BUGFIX: match submodule output names by compilerMichael Hirsch, Ph.D2019-03-251-1/+11
|
* replace library type strings with an enumDylan Baker2019-03-201-2/+2
| | | | | | | This patch creates an enum for selecting libtype as static, shared, prefer-static, or prefer-shared. This also renames 'static-shared' with 'prefer_static' and 'shared-static' with 'prefer_shared'. This is just a refactor with no behavioral changes or user facing changes.
* Add static as keyword to find_libraryNiklas Claesson2019-03-111-2/+3
|
* Add warning level zerojml17952019-02-191-6/+12
|
* Remove get_cross_extra_flagsJohn Ericson2019-02-151-2/+1
| | | | This is no longer needed, we just remove conditionals around it.
* BUGFIX: Fortran openmpMichael Hirsch, Ph.D2019-02-131-0/+6
|
* Fortran 2008 submodule (#4874)Michael Hirsch, Ph.D2019-02-051-1/+1
|
* better handle variable HDF5 setups, update Fortran compiler defMichael Hirsch, Ph.D2019-02-011-2/+2
|
* BUGFIX: allow fc.run(code) to work, pick only Fortran moduleMichael Hirsch, Ph.D2019-01-291-4/+1
|
* BUGFIX: broken/missing Fortran code/unit testsMichael Hirsch, Ph.D2019-01-271-2/+11
|
* Add PGI C and C++ compilers (#4803)Michael Hirsch, Ph.D2019-01-211-7/+0
|
* FlangFortranCompiler inherit ClangCompilerMichael Hirsch, Ph.D2019-01-161-3/+8
|
* better handle link args: PGI and FlangMichael Hirsch, Ph.D2019-01-161-2/+2
| | | | correct flang, pgi options
* Flang Fortran compiler added.Michael Hirsch, Ph.D2019-01-161-0/+7
|
* restore PGI compile functioningMichael Hirsch, Ph.D2019-01-151-13/+7
|
* Added more compiler option supportDaniel Mensinger2019-01-061-1/+1
|
* Absolute path generation refactoringDaniel Mensinger2019-01-061-0/+7
|
* compilers/fortran: pass -module ${path} instead of -module${path}Dylan Baker2018-11-151-1/+1
| | | | | ifort doesn't like the latter, and gfortran seems happy with the former. I don't have any of the other supported fortran compilers to test with.
* ifort: ifort needs to have -lifcore like gfotran needs -lgfortranDylan Baker2018-11-151-0/+3
|
* compilers: Move get_allow_undefined_link_args to CompilerDylan Baker2018-11-151-3/+0
| | | | | | | This allows each implementation (gnu-like) and msvc to be implemented in their respective classes rather than through an if tree in the CCompiler class. This is cleaner abstraction and allows us to clean up the Fortran compiler, which was calling CCompiler bound methods without an instance.
* fortran: ifort doesn't have -pipeDylan Baker2018-11-151-0/+6
|
* compilers: Use keyword only arguments for compiler interfacesDylan Baker2018-11-131-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | Because we need to inherit them in some cases, and python's keyword-or-positional arguments make this really painful, especially with inheritance. They do this in two ways: 1) If you want to intercept the arguments you need to check for both a keyword and a positional argument, because you could get either. Then you need to make sure that you only pass one of those down to the next layer. 2) After you do that, if the layer below you decides to do the same thing, but uses the other form (you used keyword by the lower level uses positional or vice versa), then you'll get a TypeError since two layers down got the argument as both a positional and a keyword. All of this is bad. Fortunately python 3.x provides a mechanism to solve this, keyword only arguments. These arguments cannot be based positionally, the interpreter will give us an error in that case. I have made a best effort to do this correctly, and I've verified it with GCC, Clang, ICC, and MSVC, but there are other compilers like Arm and Elbrus that I don't have access to.