aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/mixins
AgeCommit message (Collapse)AuthorFilesLines
2021-05-10deactivate intrinsic functions if no optimizations are requestedAlexander Neumann1-1/+1
2021-05-02Use sanity_check_impl for objc/objppRalf Gommers1-1/+1
This gets rid of compile warnings, and simplifies the code. Note that `work_dir` in sanity_check_impl was incorrect, it was used both to prepend to file names and as cwd=work_dir argument to Popen. This is fixed here. Closes gh-7344
2021-03-24compilers: clang-cl: Also accept .s files (#8520)D Scott Phillips1-0/+3
* compilers: clang-cl: Also accept .s files clang-cl has support for gas-compatible assembly files. * Add clang-cl to '128 generated assembly' test
2021-03-23Remove -pipe from default list of args. Closes #8508.Jussi Pakkanen1-1/+1
2021-03-19split program related classes and functions out of dependenciesDylan Baker1-1/+2
Dependencies is already a large and complicated package without adding programs to the list. This also allows us to untangle a bit of spaghetti that we have.
2021-03-09Add address sanitizer support for Visual Studio.Jussi Pakkanen1-0/+9
2021-03-08Add /Od flag to msvc optimization 0 argsVili VÀinölÀ1-1/+1
Without specifying optimization the used optimization depends on vs runtime-library. With mdd it is /Od but with md it is /O2.
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz8-18/+18
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04various python neatness cleanupsEli Schwartz1-3/+3
All changes were created by running "pyupgrade --py3-only --keep-percent-format" and committing the results. I have not touched string formatting for now. - use set literals - simplify .format() parameter naming - remove __future__ - remove default "r" mode for open() - use OSError rather than compatibility aliases - remove stray parentheses in function(generator) scopes
2021-02-18compilers: clang: Drop -Xclang before -fcolor-diagnostics flagKrzysztof MaƂysa1-3/+3
Using -Xclang -fcolor-diagnostics provides no advantage to using just -fcolor-diagnostics option and sometimes causes problems: * uncolored diagnostics on Arch Linux: https://bugs.archlinux.org/task/69662 * simple problem with removing flag -fcolor-diagnostics: https://github.com/clangd/clangd/issues/279
2021-02-17compilers: Only insert -flto-jobs in clang's link argumentsDylan Baker2-1/+5
Clang has a hand `-Wunused-command-line-argument` switch, which when turned to an error, gets very grump about `-flto-jobs=0` being set in the compiler arguments (although `-flto=` belongs there). We'll refactor a bit to put that only in the link arguments. GCC doesn't have this probably because, a) it doesn't have an equivalent warning, and b) it uses `-flto=<$numthreads. Fixes: #8347
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.