aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
AgeCommit message (Collapse)AuthorFilesLines
2020-11-21Create unit test for C++ modules and accept ixx as C++ source extension.Jussi Pakkanen1-1/+1
2020-11-17Revert "Add thinlto support. Closes #7493."Jussi Pakkanen4-20/+11
This reverts commit 3e6fbde94c1cb8d4e01b7daf0282c315ff0e6c7d.
2020-11-14Merge pull request #7843 from dcbaker/submit/rustc-fixesJussi Pakkanen1-0/+4
A few fixups for rust
2020-11-13msvc: enable /std:c17 flagjpark371-8/+19
Increase allowed c_std options, and check compiler version. Also update mlog pattern to not crash.
2020-11-13compilers/rust: add and use an implementation of use_linker_argsDylan Baker1-0/+4
2020-11-13Merge pull request #7866 from dcbaker/submit/compiler-std-in-baseJussi Pakkanen4-170/+123
Put the Compiler standard option in the Language mixin
2020-11-12clang-cl: Allow clang-cl (when compiling C) to pass std to underlying clang)Dylan Baker1-34/+33
This allows a wider array of standard support than would be available directly from clang-cl, emulating MSVC stds.
2020-11-12compilers/c: Log that MSVC doesn't support gnu stdsDylan Baker1-1/+13
Since the current approach of demoting to the nearest C standard *might* work, but might not. For projects like Glib that detect which standard is used and fall back this is fine. For projects like libdrm that only work with gnu standards, this wont. We're nog tusing a warning because this shouldn't be fatal if --meson-fatal-warnings is used. Also demote a similar message in IntelCl from warning to log.
2020-11-12compilers: define standards in the base language compilerDylan Baker3-152/+71
And then update the choices in each leaf class. This way we don't end up with another case where we implicitly allow an invalid standard to be set on a compiler that doesn't have a 'std' setting currently.
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-10compilers/rust: Add color outputDylan Baker1-1/+7
Rust has color output, although it's help doesn't document it. It uses the same values as cargo (and everything else), auto, never, always.
2020-11-10compilers/rust: Add vs_crt supportDylan Baker1-0/+6
As far as I can Tell, rust just handles this for us (it's always worked with no special arguments from us). However, since we're going to add support for base options for rust, we need to add the method.
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.