summaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter
AgeCommit message (Collapse)Author
2023-10-17interpreter: use typed_kwargs for build_target.name_prefixDylan Baker
2023-10-17interpreter: use typed_kwargs for build_target.link_dependsDylan Baker
2023-10-17interpreter: use typed_kwargs for build_target.gnu_symbol_visibilityDylan Baker
2023-10-17interpreter: use typed_kwargs for build_target.link_languageDylan Baker
2023-10-17interpreter: use typed_kwargs for build_target.install_rpathDylan Baker
2023-10-17interpreter: use typed_kwargs for build_target.build_rpathDylan Baker
2023-10-17interpreter: use typed_kwargs for build_target.implicit_include_directoriesDylan Baker
2023-10-17interpreter: use typed_kwargs for build_target.extra_filesDylan Baker
2023-10-17interpreter: use typed_kwargs for build_target.nativeDylan Baker
2023-10-17interpreter: use typed_kwargs for build_target.install_modeDylan Baker
2023-10-17interpreter: use typed_kwargs for build_target.installDylan Baker
2023-10-17interpreter: use typed_kwargs for build_target.build_by_defaultDylan Baker
This allows a little bit of cleanup in the build layer, since there is code now that would always be true and we shouldn't do that.
2023-10-16interpreter: use typed_kwargs for build_target.d_unittestDylan Baker
2023-10-16interpreter: use typed_kwargs for build_target.d_module_versionsDylan Baker
2023-10-16interpreter: use typed_kwargs for build_target.d_import_dirsDylan Baker
2023-10-16interpreter: use typed_kwargs for build_target.d_debugDylan Baker
2023-10-09interpreter: Add support for cargo subprojectXavier Claessens
2023-10-09interpreter: add <lang>_(static|shared)_argsDylan Baker
Which allow passing arguments specifically to the static or shared libraries. For design, this is all handled in the interpreter, by the build layer the arguments are combined into the existing fields. This limits changes required in the mid and backend layers
2023-10-09interpreter: extend annotations around build_both_librariesDylan Baker
This allows for even more accurate type information
2023-10-09interpreter: deprecated language args that don't apply to targetsDylan Baker
`java_args` is only valid for `jar()` (and `build_target()`, but that's deprecated), while all other language args are invalid for `jar()`. This deprecates all of those arguments, that shouldn't be allowed, and provides useful error messages. As an advantage, this avoids generating useless `java_static_args` and `java_shared_args`. In order to get useful error messages for both build_target and executable + *library, we need to separate LIBRARY and BUILD_TARGET a bit.
2023-10-09build: Use typed_kwargs for language argsDylan Baker
This also moves the repacking into the interpreter, making the build implementation simpler and removing a layering violation. This also makes use a defaultdict to remove the need to call `.get()`
2023-10-09interpreter: Handle BuildTarget.vala_args as Files in the interpreterDylan Baker
Way back in Meson 0.25, support was added to `vala_args` for Files. Strangely, this was never added to any other language, though it's been discussed before. For type safety, it makes more sense to handle this in the interpreter level, and pass only strings into the build IR. This is accomplished by adding a `depend_files` field to the `BuildTarget` class (which is not exposed to the user), and adding the depend files into that field, while converting the arguments to relative string paths. This ensures both the proper build dependencies happen, as well as that the arguments are always strings.
2023-10-05Add env kwarg in generator.process()Nomura
2023-10-05build: use suffix when getting target id for exesDudemanguy
When checking target names, meson explictly forbids having multiple targets with the same name. This is good, but it is strict and it is impossible to have targets with the same basename and differing suffixes (e.g. foo and foo.bin) in the same directory. Allow this for executables by including the suffix (if it exists) in the interal target id. So foo would be foo@exe and foo.bin would be foo.bin@exe.
2023-10-04interpreter: use typed_kwargs for "sources" keyword argument of build targetsDylan Baker
2023-10-04interpreter: add another overload of source_strings_to_filesDylan Baker
So that we can handle SourcesVarargsType
2023-10-04interpreter: rename SOURCE_KW to DEPENDENCY_SOURCES_KWDylan Baker
Since that's what this actually is.
2023-09-29interpreter: handle implib/export_dynamic conflicts in the interpreterDylan Baker
This differentiates export_dynamic being explicitly set to False from it being unset. This allows us to deprecate explicitly setting export_dynamic to false, but setting implib. This is already the case in the other direction, if implib is False but export_dynamic is enabled then we get a hard error. This also moves the validation up to the Interpreter and out of the build level.
2023-09-29interpreter: use typed_kwargs for executable's "implib" keyword argumentDylan Baker
2023-09-29interpreter: use typed_kwargs for executable's "pie" keyword argumentDylan Baker
2023-09-29interpreter: use typed_kwargs for executable(export_dynamic)Dylan Baker
2023-09-28fix regression that broke sanity checking of jar sourcesEli Schwartz
In commit dd22546bdd5b7de34025437ae1360f6dd20491eb the various typed_pos_args for different BuildTarget functions was refactored into a common tuple of types. It overlooked the fact that jar specifically does NOT accept the same types, and began to allow passing structured_sources in.
2023-09-28add support for vs_module_defs to ExecutablesDylan Baker
fixes: #9254
2023-09-28fix using a CustomTargetIndex for vs_module_defsDylan Baker
Because `CustomTargetIndex`es don't have a `subdir` property, but they do implement the `get_subdir()` method
2023-09-28interpreter: use typed_kwargs for build_target(vs_module_defs)Dylan Baker
2023-09-28interpreter: use typed_kwargs for static_library(pic)Dylan Baker
2023-09-28interpreter: use typed_kwargs for static_library(prelink)Dylan Baker
2023-09-27interpreter: remove rust_crate_type from the build_target checkerDylan Baker
This is already handled by the typed_kwargs
2023-09-27interpreter: used typed_kwargs for rust_dependency_mapDylan Baker
2023-09-27interpreter: add rust_abi to type annotationsDylan Baker
2023-09-27interpreter: annotate build_target functionDylan Baker
This uses an overload to try to get more accurate information from the function.
2023-09-22interpreter: Move code that dumps generated ASTXavier Claessens
That code is common to any method that generates an AST, like cargo subprojects coming soon.
2023-09-22CMakeInterpreter: Remove useless argumentsXavier Claessens
2023-09-22Allow to fallback to cmake subprojectXavier Claessens
The method can be overridden by setting the `method` key in the wrap file and always defaults to 'meson'. cmake.subproject() is still needed in case specific cmake options need to be passed. This also makes it easier to extend to other methods in the future e.g. cargo.
2023-09-19Rust: Fix both_libraries() caseXavier Claessens
Rustc does not produce object files we can reuse to build both libraries. Ideally this should be done with a single target that has both `--crate-type` arguments instead of having 2 different build rules. As temporary workaround, build twice and ensure they don't get conflicts in intermediary files created by rustc by passing target's private directory as --out-dir. See https://github.com/rust-lang/rust/issues/111083.
2023-09-19Rust: Fix proc-macro usage when cross compilingXavier Claessens
Force BUILD machine and allow to link with HOST machine.
2023-09-19Rust: Replace rust_crate_type with rust_abiXavier Claessens
Meson already knows if it's a shared or static library, user only need to specify the ABI (Rust or C).
2023-09-19interpreter: Use common definition for sources typeXavier Claessens
2023-09-19interpreter: Allow regex matching in expect_error()Xavier Claessens
2023-09-18Remove get_configtool_variable()Xavier Claessens
This also makes it more consistent with get_pkgconfig_variable() which always return empty value instead of failing when the variable does not exist. Linking that to self.required makes no sense and was never documented any way.