aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
AgeCommit message (Collapse)AuthorFilesLines
42 hoursswift: Pass C++ base compile options to swiftcHEADmasterKatalin Rebhan1-1/+5
42 hoursAdd swift_interoperability_mode kwargKatalin Rebhan7-12/+32
3 daysdependencies: fill in defaults from DEPENDENCY_KWS when generating keyDylan Baker1-1/+5
Otherwise we run into issues where the key doesn't match when some values are empty and others are not. These values can be empty when they come from `find_external_dependency`, but will be initialized to a default when they come from the `Interpreter`.
3 daysinterpreter: move dependency kwargs to shared moduleDylan Baker3-2/+9
We're going to use this in the Python module as well.
3 daysinterpreter: Add annotation for existing keyword arguments of dependencyDylan Baker2-1/+6
3 daysdependencies: Allow None in dep_identifierDylan Baker1-2/+2
Because we're going to have None once we move to more typed_kwargs
3 daysBump version number for rc1.1.9.0rc1Jussi Pakkanen1-1/+1
3 daysvala: Only pass the soname to the --shared-library argumentCorentin Noël1-1/+1
This argument requires only the filename, not the path and the actual library we want to use is the one defined with the soname. Closes: https://github.com/mesonbuild/meson/issues/14803
3 dayscargo: typing: describe which entries can be inherited from a workspacePaolo Bonzini1-21/+21
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 dayscargo: manifest: support workspace inheritancePaolo Bonzini2-11/+111
Add support for passing a workspace dictionary and setting fields from it into the dataclasses. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 dayscargo: typing: add missing fieldsPaolo Bonzini1-0/+5
Add a few fields to "package" that support workspace inheritance. Complete the Workspace dictionary. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 dayscargo: change init-time computation to lazy propertiesPaolo Bonzini3-24/+28
Make the dataclasses closer to the TypedDicts. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 dayscargo: use _raw_to_dataclass for ManifestPaolo Bonzini1-15/+14
Prepare to add type checking. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 dayscargo: move library autodetection to Manifest.from_rawPaolo Bonzini2-17/+22
It makes sense to make the lib argument optional, so do the same for all the others as well because optional arguments must all go together. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 daysunittests/cargotests: add tests for Cargo.toml parsingPaolo Bonzini1-0/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 dayscargo: fix path and crate-type for executable targetsPaolo Bonzini1-1/+30
Path cannot be empty and according to Cargo documentation these are always of bin type. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 dayscargo: move dataclasses out of interpreter modulePaolo Bonzini2-332/+277
Extracted from a patch by Xavier Classens. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 dayscargo: create dataclasses for Cargo.lockPaolo Bonzini3-40/+133
Start introducing a new simpler API for conversion of TypedDicts to dataclasses, and use it already for Cargo.lock. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 dayscargo: remove Fixed* dictionariesPaolo Bonzini2-99/+7
Create the dataclasses directly from the raw dictionaries, without an intermediate step. Extracted from a patch by Xavier Classens. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 dayscargo: move _convert_manifest to Manifest class, use keyword argsPaolo Bonzini1-18/+18
There are really many arguments, so use keyword arguments to be safe. While at it, move the function inside the dataclass. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 dayscargo: move TypedDicts for Cargo.toml to "raw" modulePaolo Bonzini3-194/+208
Fix a few issues: * Cargo.lock's version is an int * Different BuildTargets have different types for the argument of from_raw Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 dayscargo: Move toml implementation into its own moduleXavier Claessens2-48/+51
3 dayscargo: Convert PackageState into a dataclassXavier Claessens1-6/+6
3 dayscargo: Reconfigure when any Cargo.toml is modifiedXavier Claessens2-0/+5
3 dayscargo: Use -rs suffix only for rust ABIXavier Claessens1-5/+9
A cargo package can build multiple crate types for the same library. Using the same name in meson.override_dependency() fails. [pbonzini: adjust documentation]
3 dayswrap: wraps from subprojects can replace directories found with no wrapXavier Claessens1-6/+17
If main project finds a directory subprojects/foo with no corresponding foo.wrap, it creates a dummy PackageDefinition for it. If we later find a subproject that has foo.wrap, replace the dummy wrap with it. This happens for example when wrap-redirect have been deleted. It also happens for subprojects downloaded from some Cargo.lock which does not create a wrap-redirect. Avoid loading the same location twice, which can happen when preparing cargo subprojects.
3 daysformat: add --source-file-path argument for stdinCharles Brunet1-2/+19
Fixes #14539. Otherwise, .editorconfig is read from current working directory, and there is no way to know what file name to filter to choose the right section of editor config.
3 daysformat: use absolute paths to find .editorconfigCharles Brunet1-1/+1
Fixes #14538. Resolve the source file path before searching .editorconfig files, to ensure parents up to the root directory are visited.
3 dayscall determine_rpath_dirs only when linker requires itCharles Brunet7-80/+65
3 daysOptimize determine_rpath_dirsCharles Brunet1-34/+40
When generating targets in ninja backend for my project, `determine_rpath_dirs` is the second most expensive function call. Here are some optimizations: - early exit when iterating for rpath arguments - compute system_dirs and external_rpaths once per target instead of recomputing them for every link args of the target (!!!)
3 daysmove rpath functions from Backend to BuildTargetCharles Brunet3-111/+115
It is more logical, since those functions depend on a build target, and do not require anything specific to the backend. Furthermore, it will allow us to call determine_rpath_dirs from the linker in a following commit, without the need to depend on the backend.
3 daystyping: determine_rpath_dirs is only called with BuildTargetCharles Brunet1-6/+3
3 dayssimplify get_external_rpath_dirsCharles Brunet1-6/+2
coredata.get_external_link_args always returns a list
3 dayswrap: Add basic sftp support to wrap.get_data()Amp Tell1-0/+17
This requires any credentials to be supplied in the url, or some other means of authentication (such as an identity file configured for the user) to be used. Supplying a password in the URL is not supported.
3 dayswrap: Break out hash_file() functionAmp Tell1-4/+7
3 dayswrap: Slightly improve error message on wrap get failureAmp Tell1-1/+1
3 daysmodules/pkgconfig: Resolve dependencies in case of an internal dependencyCorentin Noël1-0/+8
When giving a dependency object as requires, allow to use the dependency from a subproject (that is an InternalDepdency).
3 daysgnome: make ToolType an alias and use itFlorian "sp1rit"​1-6/+5
Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
3 daysgnome: early exit from _gir_has_option if g-ir-scanner is executableFlorian "sp1rit"​1-1/+1
_gir_has_option runs g-ir-scanner --help | grep <option> to determine if the current version of g-ir-scanner supports a particular option. This already early exists if g-ir-scanner is a OverrideProgram, as it cannot be executed if it is (technically OverridePrograms can actually be executed during configure time, but not g-ir-scanner; as it depends on native modules). Do the same in case g-ir-scanner is an executable (it currently isn't but I might want to move it into one, as to avoid the rule-dependency issue with the aforementioned native module)
3 daysgnome: support generate_gir on cross buildsFlorian "sp1rit"​2-20/+47
This requires g-ir-scanner >=1.85.0, if this isn't the case we'll just fail.
3 daysgnome: Provide fallback for legacy gi-scanner without --versionFlorian "sp1rit"​1-4/+12
The --version argument was only added in g-ir-scanner 1.58, but the bionic ci still uses g-ir-scanner 1.56. Don't fail if that is the case and assume the version comparison is void.
3 daysgnome: Don't rely on gobject-introspection-1.0 anymoreFlorian "sp1rit"​1-12/+9
There isn't really any point in doing this, given that it doesn't provide any headers & libraries by itself and means projects that conditionally build introspection behind a feature only need to check for the existence of g-ir-scanner, not gobject-introspection-1.0 anymore.
6 dayssubprojects: add --filter optionPaolo Bonzini1-4/+9
6 dayssubprojects: allow passing a fnmatch patternPaolo Bonzini1-3/+5
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 daysbuild: allow non-Rust files in non-structured sourcesPaolo Bonzini2-4/+9
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 daysninjabackend: pass objects to generate_rust_target from non-Rust sourcesPaolo Bonzini2-24/+20
Make generate_rust_target essentially a replacement from generate_link, plus the actual generation of rustc compiler arguments. Remove the parts (especially flatten_object_list and get_fortran_order_deps) that generate_target already does, and add any objects files that were produced by compiling non-Rust sources. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 daysbuild: allow picking 'rust' as a link_languagePaolo Bonzini2-1/+8
rustc only needs to be a linker if there are any Rust-ABI dependencies. Skip it whenever linking to a C-ABI dependency. This makes it possible for Meson to pick 'rust' whenever it sees Rust sources, but not whenever it sees Rust used by a dependency with "rust_abi: 'c'". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 daysbuild: use PIE for Rust as wellPaolo Bonzini1-0/+2
Ensure that mixed Rust/C executables compile the non-Rust translation units with a compatible relocation model. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 daysninjabackend: handle specially TUs where compilation and linking happens ↵Paolo Bonzini4-0/+13
together Rust sources are not compiled separately: generation of the .a or .so or binary happens at the same time as compilation. There is no separate compilation phase where the .o file is created. In preparation for moving generate_rust_target where generate_link is now, make the compilation phase of generate_target skip them. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 daysninjabackend: remove one level of indentation from for loopPaolo Bonzini1-15/+16
Makes the code more similar to the earlier loop for generated sources. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>