aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
AgeCommit message (Collapse)AuthorFilesLines
2019-06-27Fix two errors when cross-compiling with ValaJames Westman1-0/+3
- AttributeError: 'ValaCompiler' object has no attribute 'get_program_dirs' Fixed by adding a `get_program_dirs()` function to the base Compiler class, to match `get_library_dirs()` - KeyError: 'vala_COMPILER' Fixed by creating the Vala compile rules for all machines, not just the build machine.
2019-06-27sanitycheckc: avoid linking sanitycheckc when cross compilingCody Schafer2-6/+13
2019-06-24Merge pull request #5524 from scivision/icl_ifortDylan Baker1-13/+14
Add ifort on Windows
2019-06-25Split attribute visibilityDylan Baker1-2/+9
* c_function_attributes: remove 'protected' from 'visibility' This doesn't exist on macos with the apple compiler, which always causes failures. Fixes #5530 * compilers: Add split visibility checks to has_function_attribute These check for a single visibility at a time, rather than all four at once. This allows for finer grained searches, and should make using these checks safer across operating systems.
2019-06-24known Python 3.5 on windows workaround for subprocess(cwd=str(Path))Michael Hirsch, Ph.D1-1/+2
2019-06-24windows ifort can't do shared_library sanelyMichael Hirsch, Ph.D1-4/+2
2019-06-24correct missing argument for IntelClFortranCompilerMichael Hirsch, Ph.D1-9/+11
ifort passes all tests cleanup logic
2019-06-23compilers: Fix bitcode and other options for objc codeNirbheek Chauhan2-2/+0
We were setting the base options for the Objective-C compiler manually, due to which options such as b_bitcode and b_ndebug were not getting set at all. The base options here are the same as for C code with the Clang compiler, so just use the same inherited list. Also expand the bitcode test to ObjC and ObjC++ so this doesn't happen again.
2019-06-22Increase logging for Rust CI failures.Jussi Pakkanen1-3/+11
2019-06-13compilers: Add logging for symbol prefix testMarvin Scholz1-0/+2
Currently meson does not write the outcome of this test to the log file which makes debugging wrong outcomes of this incredibly tedious.
2019-06-13tvOS: added support AppleTVOSRoman Shpuntov1-3/+3
2019-06-12Solaris fixesKurtis Rader1-0/+2
Fixes #5351
2019-06-11compilers: armclang supports only cross-compilationsompen1-1/+1
Revert the change done to Armclang compiler class in PR-4010
2019-06-11compilers/cpp: Fix removal of name from Combo options for Armclangsompen1-2/+1
2019-06-09Purge `is_cross` and friends without changing user interfacesJohn Ericson14-182/+147
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.
2019-06-09Use `env.machines.*` to avoid some `is_cross`John Ericson1-10/+11
This is a small example of the `is_cross` removal the that abstraction enables.
2019-06-06compilers/c: Fix removal of name from Combo options for ICLDylan Baker1-1/+1
2019-05-16Fix path splitting in get_compiler_dirs() with GCC/clang on WindowsChristoph Reiter1-9/+21
It was using ':' as a path separator while GCC uses ';' resulting in bogus paths being returned. Instead assume that the compiler uses the platform native separator. The previous splitting code still worked sometimes because splitting "C:/foo;C:/bar" resulted in the last part "/bar" being valid if "<DriveOfCWD>:/bar" existed. The fix also exposes a clang Windows bug where it uses the wrong separator: https://reviews.llvm.org/D61121 . Use a regex to fix those first. This resulted in linker errors when statically linking against a library which had an external dependency linking against system libs. Fixes #5386
2019-05-16compilers/fortran: Fix all has_argument methods in mesonDylan Baker1-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.
2019-05-15UserOption no longer has a name field.John Ericson3-57/+39
This avoids the duplication where the option is stored in a dict at its name, and also contains its own name. In general, the maxim in programming is things shouldn't know their own name, so removed the name field just leaving the option's position in the dictionary as its name.
2019-05-14Merge pull request #5331 from dcbaker/iclJussi Pakkanen6-60/+219
ICL (Intel for Windows) support
2019-05-13compilers/clike: ICL needs msvc workarounds in has_functionDylan Baker1-1/+1
2019-05-13compilers: Add basic ICL abstractionsDylan Baker5-2/+128
2019-05-13compilers: ICL is not GCC likeDylan Baker1-2/+2
2019-05-13compilers: rename IntelCompiler to IntelGnuLikeCompilerDylan Baker5-13/+13
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.
2019-05-13compilers: Split msvc version code into helperDylan Baker1-10/+13
ICL needs ot use some of this code, but not from it's own version information.
2019-05-13compilers/cpp: Split code out of VisualStudioLikeCPPCompiler for treating ↵Dylan Baker1-30/+60
c++11 as c++14 This restrictuion exists for MSVC and clang-cl, but not for ICL which actually does support C++11 as a distinct standard. This commmit pulls that behavior out into a mixin class for ClangClCPPCompiler and VisualStudioCPPCompiler, as well as moving the MSVC specific functionality into the VisualStudioCPPCompiler class.
2019-05-13Allow MSVC-style `cpp_eh` for backwards-compatibility purposesnicole mazzuca1-12/+22
2019-05-13This is the fork "sneyx1234/meson" of the current git "mesonbuild/meson" ↵Simon Ney1-0/+3
head to converge it to the solaris 11.4 platform based on the sparcv9 and i386 processor architecture. The purpose is to complete the porting related to the fork "sneyx1234/ast" of "att/ast" the "AT&T kornshell".
2019-05-10compilers: make keyword args to Compiler.compile keyword onlyDylan Baker3-4/+4
Becuase treating args as either keyword or positional makes inheritance really awful to work with.
2019-05-05Merge pull request #5339 from dcbaker/clikeJussi Pakkanen8-1700/+1605
Split up the representations of the C and C++ compilers
2019-05-05add -fno-exceptions if cpp_eh=none is specified nicole mazzuca1-8/+38
2019-05-03compilers: Split C-Like functionality into a mixin classesDylan Baker8-1686/+1608
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.
2019-05-02Revert "detect Intel ICL on windows"Dylan Baker3-18/+1
This reverts commit 3a75bb5259abbcae820b47f5f4633c564411893b.
2019-05-02Merge pull request #4952 from mensinda/cacheCompilesDylan Baker7-89/+114
Cache compilers.compile() in coredata
2019-05-02Merge pull request #5311 from mensinda/flake8PluginsJussi Pakkanen2-3/+3
Added flake8 plugins and some code fixes
2019-05-02per-target manual specification of link_languageMichael Hirsch, Ph.D1-1/+3
2019-05-02Add some type annotations and fix lintsJohn Ericson1-1/+0
Some things, like `method[...](...)` or `x: ... = ...` python 3.5 doesn't support, so I made a comment instead with the intention that it can someday be made into a real annotation.
2019-04-29Fix builtin variable namesDaniel Mensinger1-2/+2
2019-04-29Fix blind exceptionsDaniel Mensinger1-1/+1
2019-04-28Moved caching into a seperate functionDaniel Mensinger4-31/+45
2019-04-28Disable cache for dependenciesDaniel Mensinger2-8/+8
2019-04-28Add disable_cache to the fortran compilerDaniel Mensinger1-6/+6
2019-04-28Add option to disable the cacheDaniel Mensinger1-8/+8
2019-04-28Changing cached flag from True to FalseDaniel Mensinger1-1/+1
2019-04-28Fixed typeingDaniel Mensinger1-12/+12
2019-04-28Annotaded return types in the base compiler classDaniel Mensinger1-22/+22
2019-04-28Added some cahced valuesDaniel Mensinger3-6/+8
2019-04-28Print '(cached)' when compiler result was cachedDaniel Mensinger3-20/+24
2019-04-28Cache compile results in coredataDaniel Mensinger4-12/+17