Commit Graph

116 Commits

Author SHA1 Message Date
Andrea Pappacoda 68eca11cc6 Use -Oz when optimization=s in Clang
-Oz is the appropriate flag to use when you want to produce the smallest
possible binary, and is one would expect when setting optimization to s
or using the minsize build type.
2021-09-21 09:58:48 -07:00
Xavier Claessens e9386e80ae dependencyfallbacks: Use default_options for implicit fallbacks
This removes the warning when using default_options without fallback
kwarg completely because a subproject does not know if the main project
has an implicit fallback or not, so it could set default_options even if
not fallback is available at all.

Fixes: #9278
2021-09-20 13:42:07 -04:00
Filipe Laíns af8b55d49b mintro: add installed_plan
Signed-off-by: Filipe Laíns <lains@riseup.net>
2021-09-06 18:10:55 +02:00
Xavier Claessens 5e55a0bb2b interpreter: Add summary of all user defined options
It is a commonly needed information to help debugging build issues. We
already were printing options with non-default value at the end of the
configure but outside of the summary.

Keeping the list of user defined options in the interpreter will also in
the future be useful to use new default value on reconfigure.
2021-09-02 19:38:29 -04:00
Daniel Mensinger 43302d3296 interpreter: Introduce BooleanHolder for the bool primitive 2021-09-01 19:17:01 +02:00
Daniel Mensinger 43a6b5bd5e interpreter: Remove permissive from _unholder 2021-09-01 19:17:01 +02:00
Dylan Baker bd691b847c interpreter: use python dunders instead of lock for unpicklability
This simplifies things for us, as we don't have to have threading
imported for no other reason, and we can remove the
`an_unpicklable_object` from the Interpreter and mesonlib, since there
was only one user of this.
2021-08-31 16:59:37 -07:00
Daniel Mensinger 8d92e6d865 interpreter: Add IntegerHolder 2021-08-31 23:01:21 +02:00
Dylan Baker 4d7031437c pylint: turn on superflous-parens
We have a lot of these. Some of them are harmless, if unidiomatic, such
as `if (condition)`, others are potentially dangerous `assert(...)`, as
`assert(condtion)` works as expected, but `assert(condition, message)`
will result in an assertion that never triggers, as what you're actually
asserting is `bool(tuple[2])`, which will always be true.
2021-08-31 16:28:54 -04:00
Dylan Baker 81f5cee218 interpreter: rename EnvironmentVariablesObject -> EnvironmentVariablesHolder
This is more consistent with other Holder classes
2021-08-30 18:05:02 -07:00
Dylan Baker 3731e1d8f3 make EnvironmentVariablesObject a proper holder
Currently, EnvironmentVariablesObject is a strange
holder-that's-not-a-holder. This has implicaitons for things that expect
to get an EnvironmentVariables object, as we can't automatically
unholder it, and instead have to to manually do so. Now we can
automatically unholder it, which makes everything much nicer.
2021-08-30 18:05:02 -07:00
Dylan Baker ec59cbdf61 interpreter: move 'env' to type_checking 2021-08-30 18:02:56 -07:00
Dylan Baker 11fbaf29d8 interpreter: fix cases of `KwargInfo(..., T, default=None)`
The correct way to mark these is `KwargInfo(..., (T, type(None)))`.
There's also a few cases of `(T, None)` which is invalid, as `None`
isn't a type
2021-08-27 14:54:29 -07:00
Dylan Baker 3f5d80b8bb interpreter: fix name of typed_kwargs for `test()`
There was a copy-n-paste error here, and it was benchmark instead.
2021-08-27 14:49:52 -07:00
Dylan Baker aa895b383c interpreter: Add a helper for checking constrained inputs
This is quite valuable for enum-like inputs, where only a certain set
of values is allowed.
2021-08-27 14:49:23 -07:00
Rihards Skuja 4523e9d288 interpreter: fix IndexError when specifying dependency 'include_type'
Exception is thrown when dependency name is empty and when its
'include_type' differs from the default one.

Regression from b6d754a40c.
2021-08-27 19:51:48 +02:00
Tristan Partin 959e1bb2e3 Add typed_kwargs to add_languages() 2021-08-26 09:51:33 -07:00
Eli Schwartz db04a3f5f2 Fix incomplete guidance on solving sandbox violations
We recommend people use declare_dependency and access it via
dependency() in a parent project. But this requires a wrap file (or to
use override_dependency and an explicit subproject call).

Let's actually mention that.

Fixes #9146
2021-08-22 12:46:57 +03:00
Jussi Pakkanen e2f4126e41
Merge pull request #9126 from dcbaker/submit/rust-use-full-typing
Fully type check rust.bindgen
2021-08-19 18:07:43 +03:00
Xavier Claessens 8c5aa031b5 Add install tags
Fixes: #7007.
2021-08-17 15:19:18 -04:00
Dylan Baker aca2192471 interpreter: fix `source_strings_to_files` annotations
It's missing a required overload declaration
2021-08-16 12:07:56 -07:00
Tristan Partin 1dc13e9951 Add unset_variable()
This should be useful for helping to control variable scope within
Meson. CMake has something similar for controlling scope.
2021-08-16 14:05:13 -04:00
Xavier Claessens a2f110ff77 interpreter: Fix holder_map not being updated when subproject fails
Fixes: #9038
2021-08-16 12:03:33 -04:00
Jussi Pakkanen 3340d373fb Revert "interpreter: Fix holder_map not being updated when subproject fails"
This reverts commit 566383c727.
2021-08-15 13:18:35 +03:00
Xavier Claessens 27b319526c interpreter: Fix spurious warning in configure_data()
This is a regression when porting to typed_pos_args().
2021-08-09 16:42:23 -04:00
Xavier Claessens 5462ea921f interpreter: Fix missing subsubproject summary when subproject fails
In the case main->subp->subsubp, if subsubp succeed to configure but
subp subsequentially fails, subsubp is still being built but its summary
was missing.
2021-08-09 14:11:42 -04:00
Xavier Claessens 566383c727 interpreter: Fix holder_map not being updated when subproject fails
Fixes: #9038
2021-08-09 14:11:42 -04:00
Felix Schwarz 53ce1610a6 fix spelling error in user output ("depencency" -> "dependency") 2021-08-06 09:20:23 -04:00
Dylan Baker d1b52b913f interpreter: split keyword definitions out of the interpreter 2021-08-04 19:09:08 -04:00
Jussi Pakkanen 4703f4c244
Merge pull request #8992 from dcbaker/submit/modernize-python-module-dependency
Cleanup the python module
2021-07-22 01:16:24 +03:00
Xavier Claessens 0183954ea1 Fix meson.version().version_compare() regression in subproject 2021-07-21 13:33:06 -04:00
Dylan Baker a881e849b5 modules/python: simplify a number of interfaces
Including not calling back into `Interpreter.func_*`, which is not a
good idea both from a type saftey and perforamance point of view.
Instead there's now a shared _impl method
2021-07-13 16:43:14 -07:00
Dylan Baker f459c0e918 interpreter: remove stringArgs uses
It's only used now on a files that always raises an exception anyway,
might as well just not do any checking and reduces the uses of that
function
2021-07-07 11:21:12 -07:00
Dylan Baker 52c68ca6fe interpreter: use typed_pos_args for files 2021-07-07 11:21:05 -07:00
Dylan Baker 011f13bcdc interpreter: use typed_pos_args for add_langauges 2021-07-07 11:21:05 -07:00
Dylan Baker 011b58d75f interpreter: use typed_pos_args for project 2021-07-07 11:21:05 -07:00
Dylan Baker 015e44014a interpreter: use typed_pos_args for subdir 2021-07-07 11:21:05 -07:00
Dylan Baker 3f6afa2693 interpreter: use typed_pos_args for assert 2021-07-07 11:21:05 -07:00
Dylan Baker 2486938011 interpreter: use typed_pos_args for subproject 2021-07-07 11:21:04 -07:00
Dylan Baker 9f07a1ad41 interpreter: use typed_pos_args for get_option 2021-07-07 11:21:04 -07:00
Dylan Baker 6f6db0f2e3 interpreter: use typed_pos_args configuration_data 2021-07-07 11:21:04 -07:00
Dylan Baker 982973f303 interpreter: use typed_pos_args for alias_target 2021-07-07 11:21:04 -07:00
Dylan Baker 09d7da19c1 interpreter: use typed_kwargs for include_directories 2021-07-07 11:21:03 -07:00
Dylan Baker 3135b130b8 interpreter: use typed_pos_args for include_directories 2021-07-07 11:20:43 -07:00
Dylan Baker 5aed9dd939 interpreter: use typed_pos_args for add_test_setup 2021-07-07 11:20:43 -07:00
Dylan Baker e71a6544c5 interpreter: use typed_pos_args for join_paths 2021-07-07 11:20:43 -07:00
Dylan Baker 9ecd578167 interpreter: use typed_pos_args for set_variable 2021-07-07 11:20:43 -07:00
Dylan Baker 20c5dfe869 interpreter: use typed_pos_args for get_variable 2021-07-07 11:20:41 -07:00
Dylan Baker 4d05f9d64b interpreter: use typed_pos_args for is_variable 2021-07-07 11:20:07 -07:00
Dylan Baker 30a9bb60ee interpreter: use typed_pos_args for is_disabler 2021-07-07 11:20:07 -07:00