aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/mixins
AgeCommit message (Collapse)AuthorFilesLines
2020-11-20use real pathlib moduleDylan Baker2-2/+2
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
2020-11-17Revert "Add thinlto support. Closes #7493."Jussi Pakkanen3-12/+3
This reverts commit 3e6fbde94c1cb8d4e01b7daf0282c315ff0e6c7d.
2020-11-09Fix WASM thread count option. Closes #7921.Jussi Pakkanen1-2/+2
2020-11-08Add thinlto support. Closes #7493.Jussi Pakkanen3-3/+12
2020-10-14vs: add static_from_buildtype to b_vscrtPeter Harris1-5/+10
2020-10-07Add win_subsystem kwarg. Closes #7765.Jussi Pakkanen2-0/+17
2020-10-04pathlib: Fix resolve() by overriding it in Python 3.5Daniel Mensinger2-2/+2
2020-10-01compilers/icl: Fix pch usageDylan Baker1-0/+3
2020-10-01compilers/clike: Store exe_wrapper as ExternalProgramDylan Baker1-3/+3
Which is what other languages do.
2020-10-01compilers/fortran: fix has_multi_*_argumentsDylan Baker1-4/+8
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.
2020-10-01compilers/gnu: Don't pretend to inherit CLikeDylan Baker1-1/+1
We don't need it anymore, and it would be problematic for the D compilers.
2020-10-01compilers: move _build_wrapper out of clike into CompilerDylan Baker1-37/+5
This abstraction is really useful, and most compilers could use it (including D). It also will allow the Gnu mixins to work properly without the CLikeCompiler in their mro.
2020-10-01compilers: clang: use get_compiler_check_argsDylan Baker1-5/+8
2020-10-01compilers/intel: use get_compiler_check_argsDylan Baker2-24/+15
Instead of trying to override the compiles() method, which gets skipped in a bunch of cases.
2020-10-01compilers: move get_compile_check_args() to CompilerDylan Baker1-15/+9
This is groundwork to put _build_wrapper in the base Compiler, which is needed to make the D compilers truly type safe.
2020-10-01compilers/cuda: make type safeDylan Baker1-7/+0
2020-10-01compilres: move depfile_for_object to compilerDylan Baker1-3/+0
2020-10-01compilers/cs: Add type annotationsDylan Baker1-2/+1
2020-10-01compilers: move get_dependency_gen_args to base CompilerDylan Baker7-24/+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
2020-10-01compilers: move split_shlib_to_parts to the base compilerDylan Baker1-3/+0
Only the GnuLikeCompiler overrides this, and it's implemented multiple places
2020-10-01compilers: fully type annotate the C compilersDylan Baker6-6/+7
2020-09-30compilers: Use /Od for no-optimisation flag for Intel compilers on windowsIan Harvey1-2/+2
Intel compilers on Windows (and the Microsoft C++ compiler) use /Od to disable optimisation, not /O0.
2020-09-29compilers/VS: fix build to use optimization and debug flagsVili Väinölä1-17/+17
- Fixed using debug and optimization built-in options in MSVC. - Fixed that VS backend does not create pdb files in release mode. VS implicitly adds the debug fields if left out. - Fix that it is possible to add debug info with ninja backend with optimizations.
2020-09-24compilers: Tell mypy that the compiler mixins are just thatDylan Baker14-166/+110
We do this by making the mixins inherit the Compiler class only when mypy is examining the code (using some clever inheritance shenanigans). This caught a bunch of issues, and also lets us delete a ton of code.
2020-09-24compilers: make is_cross part of the base Compiler classDylan Baker1-2/+1
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.
2020-09-24compilers: make sanity_check_impl a protected methodDylan Baker1-2/+2
It's an implementation detail after all
2020-09-24compilers: put name_string method in base compilerDylan Baker1-3/+1
Every language had the exact same implementation
2020-09-24compilers/mixins: make xc16 type safeDylan Baker1-2/+7
2020-09-24compilers/mixins: make visual studio type safeDylan Baker1-2/+21
2020-09-24compilers/mixins/pgi: Make type safeDylan Baker1-2/+11
2020-09-24compilers/mixins/islinker: Make type safeDylan Baker1-0/+4
2020-09-24compilers/mixins/intel: make type safeDylan Baker1-11/+22
2020-09-24compilers/mixins/intel: Use the has_func_attribute_extra_args functionDylan Baker1-1/+3
Instead of putting that extra argument in the base compiles() class
2020-09-24compilers/mixins/emscripten: make type safeDylan Baker1-4/+11
2020-09-24compilers/mixins/elbrus: make type safeDylan Baker1-1/+5
2020-09-24compilers/mixins: make compcert type safeDylan Baker1-2/+6
2020-09-24compilers/mixins/clang: Make type safeDylan Baker1-5/+16
2020-09-24compilers/mixings/gnu: make type safeDylan Baker1-11/+34
2020-09-24compilers/mixins/clike: fix mypy issuesDylan Baker1-113/+245
2020-09-24compilers/mixins/ccrx: make mypy safeDylan Baker1-1/+6
2020-09-24compilers/mixins/c2000: Make mypy safeDylan Baker1-1/+6
2020-09-24compilers/mixins/arm: make type safeDylan Baker1-26/+24
2020-09-24compilers: Use a distinct type for compile/link resultsDylan Baker3-8/+7
Currently we do some crazy hackery where we add extra properties to a Popen object and return that. That's crazy. Especially since some of our hackery is to delete attributes off of the Popen we don't want. Instead, let's just have a discrete type that has exactly the properties we want.
2020-09-18Some fixes for CompCertSebastian Meyer1-2/+2
1. Like with gcc's `ld`, also use the `group_start` code to create a `--start-group`/`--end-group` 2. xc16 tricked into believing the 'link_whole' was about `--*-group`, but it should use gcc's `--whole-archive` instead. 3. Not clear what the get_lib_prefix should really do, but for picolibc it seems I want just `''`. The problem with picolibc was that the `-l` would be prefixed to a lib like `picolib/libm/libm.a`. Though of course the `-l` would be necessary for just a plain `m` (that's what I assumed this would be used for). I think this might need some clarification from the meson devs ;-)
2020-09-17Canonicalize target architectures aarch64/armv* into arm64/arm for MSVC toolsMartin Storsjö1-0/+4
If the architectures are taken from the output of "clang-cl --version", we need to convert these names into names that the MSVC tools accept as the -machine: parameter.
2020-09-16linkers/compilers: Move an emscripten method to the compilerDylan Baker1-0/+7
This needed an attribute the linker doesn't have.
2020-09-15Add support for the CompCert C CompilerSebastian Meyer1-0/+127
* Add preliminary support for the CompCert C Compiler The intention is to use this with the picolibc, so some GCC flags are automatically filtered. Since CompCert uses GCC is for linking, those GCC-linker flags which are used by picolibc, are automatically prefixed with '-WUl', so that they're passed to GCC. Squashed commit of the following: commit 4e0ad66dca9de301d2e41e74aea4142afbd1da7d Author: Sebastian Meyer <meyer@absint.com> Date: Mon Aug 31 14:20:39 2020 +0200 remove '-fall' from default arguments, also filter -ftls-model=.* commit 41afa3ccc62ae72824eb319cb8b34b7e6693cb67 Author: Sebastian Meyer <meyer@absint.com> Date: Mon Aug 31 14:13:55 2020 +0200 use regex for filtering ccomp args commit d68d242d0ad22f8bf53923ce849da9b86b696a75 Author: Sebastian Meyer <meyer@absint.com> Date: Mon Aug 31 13:54:36 2020 +0200 filter some gcc arguments commit 982a01756266bddbbd211c54e8dbfa2f43dec38f Author: Sebastian Meyer <meyer@absint.com> Date: Fri Aug 28 15:03:14 2020 +0200 fix ccomp meson configuration commit dce0bea00b1caa094b1ed0c6c77cf6c12f0f58d9 Author: Sebastian Meyer <meyer@absint.com> Date: Thu Aug 27 13:02:19 2020 +0200 add CompCert to meson (does not fully work, yet) * remove unused import and s/cls/self/ fixes the two obvious LGTM warnings * CompCert: Do not ignore unsupported GCC flags Some are safe to ignore, however, as per https://github.com/mesonbuild/meson/pull/7674, they should not be ignored by meson itself. Instead the meson.build should take care to select only those which are actually supported by the compiler. * remove unused variable * Only add arguments once. * Apply suggestions from code review Co-authored-by: Dylan Baker <dylan@pnwbakers.com> * Remove erroneous ' ' from '-o {}'.format() As noticed by @dcbaker * added release note snippet for compcert * properly split parameters As suggested by @dcbaker, these parameters should be properly split into multiple strings. Co-authored-by: Dylan Baker <dylan@pnwbakers.com> * Update add_compcert_compiler.md Added a sentence about the state of the implementation (experimental); use proper markdown * properly separate arguments Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
2020-09-08typing: fully annotate arglistDaniel Mensinger1-2/+2
2020-08-27Fix typo when fetching buildtype option for compiler checksNirbheek Chauhan1-1/+1
This type happened in https://github.com/mesonbuild/meson/pull/7432 and wasn't noticed because I didn't add a test for it. Rectified now. If we don't specify the CRT, MSVC will pick /MT by default (!?) and link to `libcmt.lib`. This actually *breaks* UWP because `libcmt.lib` is not available by default when building for UWP. Was noticed here: https://github.com/cisco/libsrtp/pull/505
2020-08-25Merge pull request #7581 from peterh/aixJussi Pakkanen1-1/+1
Add AIX support