summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
AgeCommit message (Collapse)Author
2020-11-13compilers/rust: add and use an implementation of use_linker_argsDylan Baker
2020-11-13Merge pull request #7866 from dcbaker/submit/compiler-std-in-baseJussi Pakkanen
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 Baker
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 Baker
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 Baker
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 Baker
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 Baker
2020-11-12Make MSVC accept gnu11 as a language standard version. Closes: #7611.Jussi Pakkanen
Fixes: #7611
2020-11-10compilers/rust: Add color outputDylan Baker
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 Baker
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 Pakkanen
2020-11-08Fix "generator doesn't stop" on WindowsChristoph Reiter
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 Pakkanen
2020-11-05rust: implement support for --editionDylan Baker
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 Claessens
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 Bederian
2020-10-16compilers/cuda: Fix has_header_symbol checkCarlos Bederian
2020-10-14vs: add static_from_buildtype to b_vscrtPeter Harris
2020-10-07Add win_subsystem kwarg. Closes #7765.Jussi Pakkanen
2020-10-06compilers: Enable C++20 for Intel C++ Compiler.Vinson Lee
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 Mensinger
2020-10-01compilers/icl fix IntelClCPP argument checkingDylan Baker
Unlike MSVC and ClangCl it needs to call into it's own compiler check args
2020-10-01compilers/icl: Fix pch usageDylan Baker
2020-10-01compilers/fortran: make ifort on windows signature match ICL'sDylan Baker
2020-10-01compilers/clike: Store exe_wrapper as ExternalProgramDylan Baker
Which is what other languages do.
2020-10-01compilers: make get_optimization_args abstractDylan Baker
2020-10-01compilers/fortran: fix has_multi_*_argumentsDylan Baker
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 Baker
2020-10-01compilers/gnu: Don't pretend to inherit CLikeDylan Baker
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 Baker
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 Baker
2020-10-01compilers/intel: use get_compiler_check_argsDylan Baker
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 Baker
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 Baker
2020-10-01compilers/java: Add type annotationsDylan Baker
2020-10-01compilers/rust: add type annotationsDylan Baker
2020-10-01compilers/swift: Add type annotationsDylan Baker
2020-10-01Compilers/vala: Add type annotationsDylan Baker
2020-10-01compilers/cuda: make type safeDylan Baker
2020-10-01compilres: move depfile_for_object to compilerDylan Baker
2020-10-01compilers/cs: Add type annotationsDylan Baker
2020-10-01compilers: move get_dependency_gen_args to base CompilerDylan Baker
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 Baker
Only the GnuLikeCompiler overrides this, and it's implemented multiple places
2020-10-01compilers/cpp: Add type annotationsDylan Baker
2020-10-01compilers: fully type annotate the C compilersDylan Baker
2020-09-30compilers: Use /Od for no-optimisation flag for Intel compilers on windowsIan Harvey
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ä
- 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 Baker
2020-09-24compilers/objc: Add type annotationsDylan Baker
2020-09-24compilers: Tell mypy that the compiler mixins are just thatDylan Baker
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.