Commit Graph

186 Commits

Author SHA1 Message Date
Dylan Baker f9b19e73a5 move OptionKey to mesonlib
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-04 12:20:40 -08:00
Dylan Baker fe973d9fc4 use OptionKey for compiler_options 2021-01-04 12:20:39 -08:00
Laurin-Luis Lehning 4164efceca Propagate Windows target checks up 2020-12-14 11:23:53 -08:00
Laurin-Luis Lehning 919278e3e1 Give get_gui_app_args access to the Environment 2020-12-14 11:23:53 -08:00
Laurin-Luis Lehning 4053babf9c Slight consistency changes to get_gui_app_args 2020-12-14 11:23:53 -08:00
Laurin-Luis Lehning 2fb4d1f751 Make win_subsystem a linker property 2020-12-14 11:23:53 -08:00
Laurin-Luis Lehning bab1087422
Add support for driving lld-link indirectly through clang on Windows 2020-12-13 16:34:50 +02:00
Jussi Pakkanen c21b04ba08 Add prelinking support for static libraries. 2020-12-03 22:58:07 +02:00
Dylan Baker f6672c7a19 use real pathlib module
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-20 15:08:40 -08:00
Jussi Pakkanen c8af3c8d29 Revert "Add thinlto support. Closes #7493."
This reverts commit 3e6fbde94c.
2020-11-17 17:51:23 +02:00
Jussi Pakkanen dffd66e0ff Fix WASM thread count option. Closes #7921. 2020-11-09 23:06:52 +02:00
Jussi Pakkanen 3e6fbde94c Add thinlto support. Closes #7493. 2020-11-08 16:00:05 +02:00
Peter Harris 8b8a610ea4 vs: add static_from_buildtype to b_vscrt 2020-10-14 19:35:28 +03:00
Jussi Pakkanen 1a0603835e Add win_subsystem kwarg. Closes #7765. 2020-10-07 18:55:25 +03:00
Daniel Mensinger 1dfaccfd91 pathlib: Fix resolve() by overriding it in Python 3.5 2020-10-04 10:45:48 +02:00
Dylan Baker f9316fbb46 compilers/icl: Fix pch usage 2020-10-01 15:06:10 -07:00
Dylan Baker ff51e1c5aa compilers/clike: Store exe_wrapper as ExternalProgram
Which is what other languages do.
2020-10-01 15:06:10 -07:00
Dylan Baker 577a2de7e8 compilers/fortran: fix has_multi_*_arguments
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-01 15:06:10 -07:00
Dylan Baker 6eb981e0c0 compilers/gnu: Don't pretend to inherit CLike
We don't need it anymore, and it would be problematic for the D
compilers.
2020-10-01 15:05:01 -07:00
Dylan Baker 738e343860 compilers: move _build_wrapper out of clike into Compiler
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-01 15:05:01 -07:00
Dylan Baker cd59ce98dc compilers: clang: use get_compiler_check_args 2020-10-01 15:05:01 -07:00
Dylan Baker 1c20f187e8 compilers/intel: use get_compiler_check_args
Instead of trying to override the compiles() method, which gets skipped
in a bunch of cases.
2020-10-01 15:05:01 -07:00
Dylan Baker 8291e947f5 compilers: move get_compile_check_args() to Compiler
This is groundwork to put _build_wrapper in the base Compiler, which is
needed to make the D compilers truly type safe.
2020-10-01 15:05:01 -07:00
Dylan Baker d3a059b55f compilers/cuda: make type safe 2020-10-01 15:05:00 -07:00
Dylan Baker 224a752489 compilres: move depfile_for_object to compiler 2020-10-01 15:05:00 -07:00
Dylan Baker 413f4d87e9 compilers/cs: Add type annotations 2020-10-01 15:05:00 -07:00
Dylan Baker e7f0890cb9 compilers: move get_dependency_gen_args to base Compiler
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-01 15:05:00 -07:00
Dylan Baker 1513aa437d compilers: move split_shlib_to_parts to the base compiler
Only the GnuLikeCompiler overrides this, and it's implemented multiple
places
2020-10-01 15:05:00 -07:00
Dylan Baker 96a1ae6dfe compilers: fully type annotate the C compilers 2020-10-01 15:05:00 -07:00
Ian Harvey 3afe18228a compilers: Use /Od for no-optimisation flag for Intel compilers on windows
Intel compilers on Windows (and the Microsoft C++ compiler) use /Od to disable optimisation, not /O0.
2020-09-30 12:01:50 -07:00
Vili Väinölä d1638a4fde compilers/VS: fix build to use optimization and debug flags
- 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-29 19:25:50 +03:00
Dylan Baker 682d22129c compilers: Tell mypy that the compiler mixins are just that
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-24 12:14:13 -07:00
Dylan Baker 2c0fbe161d compilers: make is_cross part of the base Compiler class
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-24 12:14:13 -07:00
Dylan Baker 1592b7a800 compilers: make sanity_check_impl a protected method
It's an implementation detail after all
2020-09-24 12:14:13 -07:00
Dylan Baker 98416e7f75 compilers: put name_string method in base compiler
Every language had the exact same implementation
2020-09-24 12:14:13 -07:00
Dylan Baker fa1398f86c compilers/mixins: make xc16 type safe 2020-09-24 12:14:13 -07:00
Dylan Baker 4911e8eef4 compilers/mixins: make visual studio type safe 2020-09-24 12:14:13 -07:00
Dylan Baker b6c8b8a5be compilers/mixins/pgi: Make type safe 2020-09-24 12:14:13 -07:00
Dylan Baker 6dc774f1b6 compilers/mixins/islinker: Make type safe 2020-09-24 12:14:13 -07:00
Dylan Baker 8ee1e6b768 compilers/mixins/intel: make type safe 2020-09-24 12:14:13 -07:00
Dylan Baker a0a8ef567e compilers/mixins/intel: Use the has_func_attribute_extra_args function
Instead of putting that extra argument in the base compiles() class
2020-09-24 12:14:13 -07:00
Dylan Baker 1e93d2875e compilers/mixins/emscripten: make type safe 2020-09-24 12:14:13 -07:00
Dylan Baker 04a98baafb compilers/mixins/elbrus: make type safe 2020-09-24 12:14:13 -07:00
Dylan Baker bc532a8543 compilers/mixins: make compcert type safe 2020-09-24 12:14:13 -07:00
Dylan Baker 48a181866f compilers/mixins/clang: Make type safe 2020-09-24 12:14:13 -07:00
Dylan Baker 4b52184dc6 compilers/mixings/gnu: make type safe 2020-09-24 12:14:13 -07:00
Dylan Baker bb3fe3c451 compilers/mixins/clike: fix mypy issues 2020-09-24 12:14:13 -07:00
Dylan Baker 4cfddd1fe6 compilers/mixins/ccrx: make mypy safe 2020-09-24 12:14:13 -07:00
Dylan Baker c93395bfc7 compilers/mixins/c2000: Make mypy safe 2020-09-24 12:14:13 -07:00
Dylan Baker b7db3660a0 compilers/mixins/arm: make type safe 2020-09-24 12:14:13 -07:00