Commit Graph

24 Commits

Author SHA1 Message Date
Paolo Bonzini 3efed376c3 linkers: remove is_shared_module argument to get_soname_args
The argument is now unused, drop it.
2021-07-14 22:53:04 +02:00
Eli Schwartz bd6f46e723 condense lines 2021-07-05 17:55:04 +03:00
Eli Schwartz b4b488f33c simplify mesonlib imports for the sake of line lengths 2021-07-05 17:55:04 +03:00
Eli Schwartz dd31891c1f more f-strings too complex to be caught by pyupgrade 2021-07-05 17:55:04 +03:00
Eli Schwartz 6a0fabc647
mass rewrite of string formatting to use f-strings everywhere
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04 17:16:11 -05:00
Dylan Baker 6c1467db27 compilers: Only insert -flto-jobs in clang's link arguments
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-17 18:06:52 +02:00
Dylan Baker fe973d9fc4 use OptionKey for compiler_options 2021-01-04 12:20:39 -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 3e6fbde94c Add thinlto support. Closes #7493. 2020-11-08 16:00:05 +02:00
Dylan Baker 413f4d87e9 compilers/cs: Add type annotations 2020-10-01 15:05:00 -07: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 6dc774f1b6 compilers/mixins/islinker: Make type safe 2020-09-24 12:14:13 -07:00
Nirbheek Chauhan 21da2c9040 Fix native builds on Windows ARM64 machines
I made the mistake of always selecting the debug CRT for compiler
checks on Windows 4 years ago:
https://github.com/mesonbuild/meson/pull/543
https://github.com/mesonbuild/meson/pull/614

The idea was to always build the tests with debugging enabled so that
the compiler doesn't optimize the tests away. But we stopped doing
that a while ago, and also the debug CRT has no relation to that.

We should select the CRT in the same way that we do for building
targets: based on the options.

On Windows ARM64, the debug CRT for ARM64 isn't always available, and
the release CRT is available only after installing the runtime
package. Without this, we will always try to pick the debug CRT even
when --buildtype=debugoptimized or release.
2020-07-13 15:28:38 +00:00
Dan Kegel d7235c5905 Let .pc files specify rpath.
Fixes #4027
2020-05-16 20:25:58 +00:00
John Ericson 3a4388e51d Fix legacy env var support with cross
Fix #3969
2020-03-23 17:51:36 +02:00
Dylan Baker b2f86c461b compilers/mixins/islinker: Add stubs for thread_*_flags 2020-02-27 16:35:02 -08:00
Dylan Baker fa3c25d279 compilers/mixins/islinker: Add missing method
In particular emcc needs this
2020-02-27 16:35:02 -08:00
Daniel Mensinger 09b53c534f types: import typing as T (fixes #6333) 2020-01-08 15:28:17 +01:00
Andrei Alexeyev c20d40789b Implement get_buildtype_linker_args in BasicLinkerIsCompilerMixin 2019-10-14 13:04:34 -07:00
Andrei Alexeyev 062a510a30 Implement get_asneeded_args in BasicLinkerIsCompilerMixin 2019-10-14 13:04:34 -07:00
Andrei Alexeyev 0845b7dd3d Implement get_linker_debug_crt_args in BasicLinkerIsCompilerMixin 2019-10-14 13:04:34 -07:00
Andrei Alexeyev 9488e4acfe Fix misnamed method in BasicLinkerIsCompilerMixin
get_allow_undefined_link_args is the compiler method
get_allow_undefined_args is the linker method
2019-10-14 13:04:34 -07:00
Aleksey Gurtovoy 75daed27bc mesonlib.split_args/quote_arg/join_args 2019-09-05 23:42:47 +03:00
Dylan Baker 38d588bc6e compilers/mixins: Add a module for mixins for compilers that are linkers
This is currently meant to solve problems for D's DMD compiler, however
it may be useful in other cases.
2019-08-14 13:13:23 -07:00