summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
Commit message (Collapse)AuthorAgeFilesLines
* Add custom entyr to cuda buildtype dict. Closes #8336.Jussi Pakkanen2021-02-141-0/+1
|
* Add support for LLVM's thinLTODylan Baker2021-02-021-2/+6
| | | | | | | This uses a separate option, b_lto_mode. It works in conjunction with b_lto_threads. Fixes #7493
* compilers: Add support for using multiple threads with ltoDylan Baker2021-02-021-2/+18
| | | | | | | | Both Clang and GCC support using multiple threads for preforming link time optimizaions, and they can now be configured using the `-Db_lto_threads` option. Fixes #7820
* Fix misspellsAntonin Décimo2021-01-131-3/+3
| | | | Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
* move handling of CFLAGS and friends to environmentDylan Baker2021-01-111-60/+15
| | | | | | This has a bunch of nice features. It obviously centralizes everything, which is nice. It also means that env is only re-read at `meson --wipe`, not `meson --reconfigure`. And it's going to allow more cleanups.
* use PEP8 style naming for LANGUAGES_USING_* as wellDylan Baker2021-01-111-4/+4
|
* rename cflags_mapping to CFLAGS_MAPPINGDylan Baker2021-01-111-14/+18
| | | | | | This is PEP8 convention for a const variable. Also, make the type Mapping, which doesn't have mutation methods. This means mypy will warn us if someone tries to change this.
* use OptionKey for builtin and base optionsDylan Baker2021-01-041-55/+51
| | | | | | | | I would have prefered to do these seperatately, but they are combined in some cases, so it was much easier to convert them together. this eliminates the builtins_per_machine dict, as it's duplicated with the OptionKey's machine parameter.
* move OptionKey to mesonlibDylan Baker2021-01-041-2/+1
| | | | | 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-13/+13
|
* Propagate Windows target checks upLaurin-Luis Lehning2020-12-141-4/+4
|
* Give get_gui_app_args access to the EnvironmentLaurin-Luis Lehning2020-12-141-2/+2
|
* Slight consistency changes to get_gui_app_argsLaurin-Luis Lehning2020-12-141-1/+2
|
* Give get_win_subsystem_args access to envLaurin-Luis Lehning2020-12-141-2/+2
|
* Make win_subsystem a linker propertyLaurin-Luis Lehning2020-12-141-5/+4
|
* Create unit test for C++ modules and accept ixx as C++ source extension.Jussi Pakkanen2020-12-111-1/+1
|
* Add prelinking support for static libraries.Jussi Pakkanen2020-12-031-0/+2
|
* Add a variant of TemporaryDirectory that uses windows_proof_rmtree()Christoph Reiter2020-11-231-53/+48
| | | | | | | | Adds TemporaryDirectoryWinProof which calls windows_proof_rmtree() on error. Use instead of hacky error handling (which might shadow other OSError) in Compiler.compile().
* Revert "Add thinlto support. Closes #7493."Jussi Pakkanen2020-11-171-8/+8
| | | | This reverts commit 3e6fbde94c1cb8d4e01b7daf0282c315ff0e6c7d.
* Fix "generator doesn't stop" on WindowsChristoph Reiter2020-11-081-1/+1
| | | | | | | | | | | | | | When TemporaryDirectory() cleans up on __exit__ it sometimes throws OSError noting that the dir isn't empty. This happens after the first yield in this generator and leads to the exception being handled which leads to a second yield. contextlib.contextmanager() fails then since the function it wraps is only allowed to yield once. Fix this by not yielding again in the error case. Fixes #7947
* Add thinlto support. Closes #7493.Jussi Pakkanen2020-11-081-8/+8
|
* Refactor handling of machine file optionsXavier Claessens2020-10-161-8/+3
| | | | | | It is much easier to not try to parse options into complicated structures until we actually collected all options: machine files, command line, project()'s default_options, environment.
* vs: add static_from_buildtype to b_vscrtPeter Harris2020-10-141-1/+1
|
* Add win_subsystem kwarg. Closes #7765.Jussi Pakkanen2020-10-071-0/+7
|
* compilers: make get_optimization_args abstractDylan Baker2020-10-011-1/+2
|
* compilers/d: add type annotationsDylan Baker2020-10-011-0/+5
|
* compilers: move _build_wrapper out of clike into CompilerDylan Baker2020-10-011-14/+74
| | | | | | 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: move get_compile_check_args() to CompilerDylan Baker2020-10-011-4/+30
| | | | | This is groundwork to put _build_wrapper in the base Compiler, which is needed to make the D compilers truly type safe.
* compilers/fortran: add type annotationsDylan Baker2020-10-011-0/+9
|
* Compilers/vala: Add type annotationsDylan Baker2020-10-011-0/+9
|
* compilers/cuda: make type safeDylan Baker2020-10-011-0/+10
|
* compilres: move depfile_for_object to compilerDylan Baker2020-10-011-0/+5
|
* compilers/cs: Add type annotationsDylan Baker2020-10-011-0/+8
|
* compilers: move get_dependency_gen_args to base CompilerDylan Baker2020-10-011-0/+3
| | | | | | 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-0/+3
| | | | | Only the GnuLikeCompiler overrides this, and it's implemented multiple places
* compilers/cpp: Add type annotationsDylan Baker2020-10-011-0/+11
|
* compilers: fully type annotate the C compilersDylan Baker2020-10-011-0/+1
|
* compilers: Tell mypy that the compiler mixins are just thatDylan Baker2020-09-241-12/+11
| | | | | | 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-1/+2
| | | | | | | 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: put name_string method in base compilerDylan Baker2020-09-241-0/+3
| | | | Every language had the exact same implementation
* compilers/mixins/intel: Use the has_func_attribute_extra_args functionDylan Baker2020-09-241-0/+3
| | | | Instead of putting that extra argument in the base compiles() class
* compilers/mixins/clang: Make type safeDylan Baker2020-09-241-0/+8
|
* compilers/mixins/clike: fix mypy issuesDylan Baker2020-09-241-33/+50
|
* compilers/compilers: Fully type annotateDylan Baker2020-09-241-163/+254
|
* compilers: Use a distinct type for compile/link resultsDylan Baker2020-09-241-19/+33
| | | | | | | 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.
* external-project: New module to build configure/make projectsXavier Claessens2020-09-131-0/+3
| | | | | | | This adds an experimental meson module to build projects with other build systems. Closes: #4316
* typing: get rid of most T.castDaniel Mensinger2020-09-081-1/+1
|
* Fix native builds on Windows ARM64 machinesNirbheek Chauhan2020-07-131-3/+0
| | | | | | | | | | | | | | | | | | | I made the mistake of always selecting the debug CRT for compiler checks on Windows 4 years ago: https://github.com/mesonbuild/meson/pull/543 https://github.com/mesonbuild/meson/pull/614 The idea was to always build the tests with debugging enabled so that the compiler doesn't optimize the tests away. But we stopped doing that a while ago, and also the debug CRT has no relation to that. We should select the CRT in the same way that we do for building targets: based on the options. On Windows ARM64, the debug CRT for ARM64 isn't always available, and the release CRT is available only after installing the runtime package. Without this, we will always try to pick the debug CRT even when --buildtype=debugoptimized or release.
* compilers: Return CompilerArgs from compiler instanceDylan Baker2020-06-221-2/+7
| | | | | | | Since the CompileArgs class already needs to know about the compiler, and we really need at least per-lanaguage if not per-compiler CompilerArgs classes, let's get the CompilerArgs instance from the compiler using a method.
* compilers: Split CompilerArgs into a separate moduleDylan Baker2020-06-221-370/+2
| | | | | I've also moved this out of the compilers pacakge because we're soon going to need it in linkers, and that creates some serious spagetti