aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
AgeCommit message (Collapse)AuthorFilesLines
2020-11-12compilers: Standardize the names of compiler optionsDylan Baker3-16/+16
Most options don't use language prefaced options (std vs c_std) internally, as we don't need that due to namespacing. Let's do that across the board
2020-11-12compilers/c: Clang-cl also needs specific handling for standardsDylan Baker1-0/+19
2020-11-12Make MSVC accept gnu11 as a language standard version. Closes: #7611.Jussi Pakkanen1-3/+7
Fixes: #7611
2020-11-09Fix WASM thread count option. Closes #7921.Jussi Pakkanen1-2/+2
2020-11-08Fix "generator doesn't stop" on WindowsChristoph Reiter1-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
2020-11-08Add thinlto support. Closes #7493.Jussi Pakkanen4-11/+20
2020-11-05rust: implement support for --editionDylan Baker1-0/+19
Using the std option, so now `rust_std=..` will work. I've chosen to use "std" even though rust calls these "editions", as meson refers to language versions as "standards", which makes meson feel more uniform, and be less surprising. Fixes: #5100
2020-10-16Refactor handling of machine file optionsXavier Claessens1-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.
2020-10-16compilers/cuda: Use format_map(mapping) instead of format(**mapping)Carlos Bederian1-2/+2
2020-10-16compilers/cuda: Fix has_header_symbol checkCarlos Bederian1-4/+17
2020-10-14vs: add static_from_buildtype to b_vscrtPeter Harris3-11/+22
2020-10-07Add win_subsystem kwarg. Closes #7765.Jussi Pakkanen3-0/+24
2020-10-06compilers: Enable C++20 for Intel C++ Compiler.Vinson Lee1-0/+3
Intel C++ Compiler 19.1 has C++20 features. https://software.intel.com/content/www/us/en/develop/articles/intel-c-compiler-191-for-linux-release-notes-for-intel-parallel-studio-xe-2020.html Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2020-10-04pathlib: Fix resolve() by overriding it in Python 3.5Daniel Mensinger3-3/+3
2020-10-01compilers/icl fix IntelClCPP argument checkingDylan Baker1-0/+4
Unlike MSVC and ClangCl it needs to call into it's own compiler check args
2020-10-01compilers/icl: Fix pch usageDylan Baker1-0/+3
2020-10-01compilers/fortran: make ifort on windows signature match ICL'sDylan Baker1-1/+1
2020-10-01compilers/clike: Store exe_wrapper as ExternalProgramDylan Baker2-4/+4
Which is what other languages do.
2020-10-01compilers: make get_optimization_args abstractDylan Baker2-1/+5
2020-10-01compilers/fortran: fix has_multi_*_argumentsDylan Baker2-23/+12
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/d: add type annotationsDylan Baker2-128/+143
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 Baker2-51/+79
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 Baker3-26/+47
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/fortran: add type annotationsDylan Baker2-92/+143
2020-10-01compilers/java: Add type annotationsDylan Baker1-24/+22
2020-10-01compilers/rust: add type annotationsDylan Baker1-25/+38
2020-10-01compilers/swift: Add type annotationsDylan Baker1-30/+37
2020-10-01Compilers/vala: Add type annotationsDylan Baker2-24/+35
2020-10-01compilers/cuda: make type safeDylan Baker6-71/+75
2020-10-01compilres: move depfile_for_object to compilerDylan Baker4-13/+6
2020-10-01compilers/cs: Add type annotationsDylan Baker3-44/+40
2020-10-01compilers: move get_dependency_gen_args to base CompilerDylan Baker13-40/+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
2020-10-01compilers: move split_shlib_to_parts to the base compilerDylan Baker4-9/+3
Only the GnuLikeCompiler overrides this, and it's implemented multiple places
2020-10-01compilers/cpp: Add type annotationsDylan Baker3-115/+189
2020-10-01compilers: fully type annotate the C compilersDylan Baker8-126/+204
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/objcpp: add type annotationsDylan Baker1-14/+30
2020-09-24compilers/objc: Add type annotationsDylan Baker1-14/+27
2020-09-24compilers: Tell mypy that the compiler mixins are just thatDylan Baker15-178/+121
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 Baker13-37/+34
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 Baker3-4/+4
It's an implementation detail after all
2020-09-24compilers: put name_string method in base compilerDylan Baker9-24/+4
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