summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/mixins
Commit message (Collapse)AuthorAgeFilesLines
* Add prelinking support for static libraries.Jussi Pakkanen2020-12-031-0/+3
|
* use real pathlib moduleDylan Baker2020-11-202-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
* Revert "Add thinlto support. Closes #7493."Jussi Pakkanen2020-11-173-12/+3
| | | | This reverts commit 3e6fbde94c1cb8d4e01b7daf0282c315ff0e6c7d.
* Fix WASM thread count option. Closes #7921.Jussi Pakkanen2020-11-091-2/+2
|
* Add thinlto support. Closes #7493.Jussi Pakkanen2020-11-083-3/+12
|
* vs: add static_from_buildtype to b_vscrtPeter Harris2020-10-141-5/+10
|
* Add win_subsystem kwarg. Closes #7765.Jussi Pakkanen2020-10-072-0/+17
|
* pathlib: Fix resolve() by overriding it in Python 3.5Daniel Mensinger2020-10-042-2/+2
|
* compilers/icl: Fix pch usageDylan Baker2020-10-011-0/+3
|
* compilers/clike: Store exe_wrapper as ExternalProgramDylan Baker2020-10-011-3/+3
| | | | Which is what other languages do.
* compilers/fortran: fix has_multi_*_argumentsDylan Baker2020-10-011-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.
* compilers/gnu: Don't pretend to inherit CLikeDylan Baker2020-10-011-1/+1
| | | | | We don't need it anymore, and it would be problematic for the D compilers.
* compilers: move _build_wrapper out of clike into CompilerDylan Baker2020-10-011-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.
* compilers: clang: use get_compiler_check_argsDylan Baker2020-10-011-5/+8
|
* compilers/intel: use get_compiler_check_argsDylan Baker2020-10-012-24/+15
| | | | | Instead of trying to override the compiles() method, which gets skipped in a bunch of cases.
* compilers: move get_compile_check_args() to CompilerDylan Baker2020-10-011-15/+9
| | | | | This is groundwork to put _build_wrapper in the base Compiler, which is needed to make the D compilers truly type safe.
* compilers/cuda: make type safeDylan Baker2020-10-011-7/+0
|
* compilres: move depfile_for_object to compilerDylan Baker2020-10-011-3/+0
|
* compilers/cs: Add type annotationsDylan Baker2020-10-011-2/+1
|
* compilers: move get_dependency_gen_args to base CompilerDylan Baker2020-10-017-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
* compilers: move split_shlib_to_parts to the base compilerDylan Baker2020-10-011-3/+0
| | | | | Only the GnuLikeCompiler overrides this, and it's implemented multiple places
* compilers: fully type annotate the C compilersDylan Baker2020-10-016-6/+7
|
* compilers: Use /Od for no-optimisation flag for Intel compilers on windowsIan Harvey2020-09-301-2/+2
| | | | Intel compilers on Windows (and the Microsoft C++ compiler) use /Od to disable optimisation, not /O0.
* compilers/VS: fix build to use optimization and debug flagsVili Väinölä2020-09-291-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.
* compilers: Tell mypy that the compiler mixins are just thatDylan Baker2020-09-2414-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.
* compilers: make is_cross part of the base Compiler classDylan Baker2020-09-241-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.
* compilers: make sanity_check_impl a protected methodDylan Baker2020-09-241-2/+2
| | | | It's an implementation detail after all
* compilers: put name_string method in base compilerDylan Baker2020-09-241-3/+1
| | | | Every language had the exact same implementation
* compilers/mixins: make xc16 type safeDylan Baker2020-09-241-2/+7
|
* compilers/mixins: make visual studio type safeDylan Baker2020-09-241-2/+21
|
* compilers/mixins/pgi: Make type safeDylan Baker2020-09-241-2/+11
|
* compilers/mixins/islinker: Make type safeDylan Baker2020-09-241-0/+4
|
* compilers/mixins/intel: make type safeDylan Baker2020-09-241-11/+22
|
* compilers/mixins/intel: Use the has_func_attribute_extra_args functionDylan Baker2020-09-241-1/+3
| | | | Instead of putting that extra argument in the base compiles() class
* compilers/mixins/emscripten: make type safeDylan Baker2020-09-241-4/+11
|
* compilers/mixins/elbrus: make type safeDylan Baker2020-09-241-1/+5
|
* compilers/mixins: make compcert type safeDylan Baker2020-09-241-2/+6
|
* compilers/mixins/clang: Make type safeDylan Baker2020-09-241-5/+16
|
* compilers/mixings/gnu: make type safeDylan Baker2020-09-241-11/+34
|
* compilers/mixins/clike: fix mypy issuesDylan Baker2020-09-241-113/+245
|
* compilers/mixins/ccrx: make mypy safeDylan Baker2020-09-241-1/+6
|
* compilers/mixins/c2000: Make mypy safeDylan Baker2020-09-241-1/+6
|
* compilers/mixins/arm: make type safeDylan Baker2020-09-241-26/+24
|
* compilers: Use a distinct type for compile/link resultsDylan Baker2020-09-243-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.
* Some fixes for CompCertSebastian Meyer2020-09-181-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 ;-)
* Canonicalize target architectures aarch64/armv* into arm64/arm for MSVC toolsMartin Storsjö2020-09-171-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.
* linkers/compilers: Move an emscripten method to the compilerDylan Baker2020-09-161-0/+7
| | | | This needed an attribute the linker doesn't have.
* Add support for the CompCert C CompilerSebastian Meyer2020-09-151-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>
* typing: fully annotate arglistDaniel Mensinger2020-09-081-2/+2
|
* Fix typo when fetching buildtype option for compiler checksNirbheek Chauhan2020-08-271-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