aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/mixins
AgeCommit message (Collapse)AuthorFilesLines
2021-02-02Add support for LLVM's thinLTODylan Baker2-6/+15
This uses a separate option, b_lto_mode. It works in conjunction with b_lto_threads. Fixes #7493
2021-02-02compilers: Add support for using multiple threads with ltoDylan Baker2-3/+24
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
2021-01-20MSVC and Clang-Cl Compiler Argument CleanupMarios Staikopoulos1-27/+6
This commit performs some cleanup for the msvc and clang-cl arguments. * "Disable Debug" (`/Od`) is no longer manually specified for optimization levels {`0`,`g`} (it is already the default for MSVC). * "Run Time Checking" (`/RTC1`) removed from `debug` buildtype by default * Clang-CL `debug` buildtype arguments now match MSVC arguments * There is now no difference between `buildtype` flags and `debug` + `optimization` flags
2021-01-20Avoid accidental use of STANDALONE_WASM mode on compiler testsBrion Vibber1-1/+1
Compiler tests, such as checking for atomics support, could fail when compiling to WebAssembly multithreaded targets because the compiler tests got compiled to 'output.wasm'. Using the '.wasm' suffix in recent versions of emscripten engages STANDALONE_WASM mode, which disables features that require a JS runtime like shared memory. This created false negatives on support of those features when building a library to be linked into an executable that is not in STANDALONE_WASM mode. Changing these to 'output.o' will continue to produce WebAssembly object files, but they will no longer be configured for standalone runtime mode.
2021-01-17Removal of /ZI on MSVC DebugMarios Staikopoulos1-2/+2
The /ZI flag adds in "Edit and Continue" debug information, which will cause massive slowdown. It is not a flag that we should be adding by default to debug builds. /Zi will still be added.
2021-01-13Fix misspellsAntonin Décimo1-2/+2
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
2021-01-04Use a single coredata dictionary for optionsDylan Baker2-3/+3
This patches takes the options work to it's logical conclusion: A single flat dictionary of OptionKey: UserOptions. This allows us to simplify a large number of cases, as we don't need to check if an option is in this dict or that one (or any of 5 or 6, actually).
2021-01-04use OptionKey for builtin and base optionsDylan Baker9-22/+31
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.
2021-01-04move OptionKey to mesonlibDylan Baker1-2/+3
There's starting to be a lot of things including coredata that coredata needs to itself include. putting it in mesonlib makes more sense
2021-01-04use OptionKey for compiler_optionsDylan Baker2-6/+7
2020-12-14Propagate Windows target checks upLaurin-Luis Lehning2-5/+3
2020-12-14Give get_gui_app_args access to the EnvironmentLaurin-Luis Lehning1-1/+1
2020-12-14Slight consistency changes to get_gui_app_argsLaurin-Luis Lehning1-8/+0
2020-12-14Make win_subsystem a linker propertyLaurin-Luis Lehning3-23/+0
2020-12-13Add support for driving lld-link indirectly through clang on WindowsLaurin-Luis Lehning1-1/+7
2020-12-03Add prelinking support for static libraries.Jussi Pakkanen1-0/+3
2020-11-20use real pathlib moduleDylan Baker2-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
2020-11-17Revert "Add thinlto support. Closes #7493."Jussi Pakkanen3-12/+3
This reverts commit 3e6fbde94c1cb8d4e01b7daf0282c315ff0e6c7d.
2020-11-09Fix WASM thread count option. Closes #7921.Jussi Pakkanen1-2/+2
2020-11-08Add thinlto support. Closes #7493.Jussi Pakkanen3-3/+12
2020-10-14vs: add static_from_buildtype to b_vscrtPeter Harris1-5/+10
2020-10-07Add win_subsystem kwarg. Closes #7765.Jussi Pakkanen2-0/+17
2020-10-04pathlib: Fix resolve() by overriding it in Python 3.5Daniel Mensinger2-2/+2
2020-10-01compilers/icl: Fix pch usageDylan Baker1-0/+3
2020-10-01compilers/clike: Store exe_wrapper as ExternalProgramDylan Baker1-3/+3
Which is what other languages do.
2020-10-01compilers/fortran: fix has_multi_*_argumentsDylan Baker1-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.
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 Baker1-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.
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 Baker1-15/+9
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/cuda: make type safeDylan Baker1-7/+0
2020-10-01compilres: move depfile_for_object to compilerDylan Baker1-3/+0
2020-10-01compilers/cs: Add type annotationsDylan Baker1-2/+1
2020-10-01compilers: move get_dependency_gen_args to base CompilerDylan Baker7-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
2020-10-01compilers: move split_shlib_to_parts to the base compilerDylan Baker1-3/+0
Only the GnuLikeCompiler overrides this, and it's implemented multiple places
2020-10-01compilers: fully type annotate the C compilersDylan Baker6-6/+7
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: Tell mypy that the compiler mixins are just thatDylan Baker14-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.
2020-09-24compilers: make is_cross part of the base Compiler classDylan Baker1-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.
2020-09-24compilers: make sanity_check_impl a protected methodDylan Baker1-2/+2
It's an implementation detail after all
2020-09-24compilers: put name_string method in base compilerDylan Baker1-3/+1
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
2020-09-24compilers/mixins/intel: make type safeDylan Baker1-11/+22
2020-09-24compilers/mixins/intel: Use the has_func_attribute_extra_args functionDylan Baker1-1/+3
Instead of putting that extra argument in the base compiles() class
2020-09-24compilers/mixins/emscripten: make type safeDylan Baker1-4/+11