aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/build.py
AgeCommit message (Collapse)AuthorFilesLines
2021-05-19build: annotate can_compile_remove_sourcesDylan Baker1-1/+1
2021-05-19build: Simplify BuildTarget.process_sourcelistDylan Baker1-14/+14
2021-05-19interpreter: Pass unholdered sources into BuildTargetDylan Baker1-3/+3
The build level shouldn't be deal with interpreter objects, by the time they leave the intpreter they should be in the Meson middle layer representaiton
2021-04-19pkgconfig: Add support for CustomTarget objects in generatorXavier Claessens1-0/+3
Fixes: #8618.
2021-04-18Xcode: fix generators that take custom targets as inputs.Jussi Pakkanen1-2/+8
2021-04-10Xcode: Fix source generation.Jussi Pakkanen1-0/+7
2021-03-26Remove ConfigureFile and ConfigureFileHolderXavier Claessens1-26/+0
They are not used anywhere.
2021-03-23environment(): Allow stacking append() and prepend() (#8547)Xavier Claessens1-1/+1
* environment(): Allow stacking append() and prepend() * Update docs/markdown/Reference-manual.md Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com> Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
2021-03-19split program related classes and functions out of dependenciesDylan Baker1-3/+4
Dependencies is already a large and complicated package without adding programs to the list. This also allows us to untangle a bit of spaghetti that we have.
2021-03-16Add `meson devenv` command and meson.add_devenv()Xavier Claessens1-1/+2
2021-03-16EnvironmentVariables: Simplify and annotateXavier Claessens1-25/+20
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz1-36/+36
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04various python neatness cleanupsEli Schwartz1-21/+21
All changes were created by running "pyupgrade --py3-only --keep-percent-format" and committing the results. I have not touched string formatting for now. - use set literals - simplify .format() parameter naming - remove __future__ - remove default "r" mode for open() - use OSError rather than compatibility aliases - remove stray parentheses in function(generator) scopes
2021-03-04build: Fix backend typeXavier Claessens1-1/+2
2021-02-27install_man locale supportJason Woodward1-1/+3
Rather than having to manually build the locale aware man paths with `install_data('foo.fr.1', install_dir: join_paths(get_option('mandir'), 'fr', 'man1'), rename: 'foo.1')` Support doing `install_man('foo.fr.1', locale: 'fr')`
2021-02-25Allow custom target output to be processed by generatorsMatthias Klumpp1-10/+24
2021-02-22minstall: Add --skip-subprojects optionXavier Claessens1-4/+11
By default all subprojects are installed. If --skip-subprojects is given with no value only the main project is installed. If --skip-subprojects is given with a value, it should be a coma separated list of subprojects to skip and all others will be installed. Fixes: #2550.
2021-02-07Merge pull request #8162 from dcbaker/wip/2021-01/rust-module-bindgenJussi Pakkanen1-2/+10
Add a wrapper to the rust module for bindgen
2021-02-07Merge pull request #8288 from bonzini/test-setup-exclude-suitesJussi Pakkanen1-3/+4
introduce add_test_setup(exclude suites: ...) keyword argument
2021-02-06build: Add type annotations for CustomTarget constructorDylan Baker1-2/+3
which are needed in the rust module for bindgen support.
2021-02-06Add a method to IncludeDirs to convert to string listDylan Baker1-0/+7
I'm going to use this in the rust module as well, so having a single source of truth is useful.
2021-02-05run_target: Add env kwargXavier Claessens1-35/+37
Re-implement it in backend using the same code path as for custom_target(). This for example handle setting PATH on Windows when command is an executable.
2021-02-02interpreter, mtest: introduce add_test_setup(exclude_suites: ...)Paolo Bonzini1-1/+3
This new keyword argument makes it possible to run specific test setups only on a subset of the tests. For example, to mark some tests as slow and avoid running them by default: add_test_setup('quick', exclude_suites: ['slow'], is_default: true) add_test_setup('slow') It will then be possible to run the slow tests with either `meson test --setup slow` or `meson test --suite slow`.
2021-02-02build: fix flake8Paolo Bonzini1-2/+1
2021-01-30build: add function get_build_targets to Build classJeff Moguillansky1-0/+7
Add function to Build class to get targets of type BuildTarget Update xcode backend to call get_build_targets when iterating over targets. This resolves crash in xcode backend when using custom targets: AttributeError: ‘CustomTarget’ object has no attribute ‘objects’
2021-01-30Fix executable as script on WindowsXavier Claessens1-8/+0
On Windows this would fail because of missing DLL: ``` mylib = library(...) exe = executable(..., link_with: mylib) meson.add_install_script(exe) ``` The reason is on Windows we cannot rely on rpath to find libraries from build directory, they are searched in $PATH. We already have all that mechanism in place for custom_target() using ExecutableSerialisation class, so reuse it for install/dist/postconf scripts too. This has bonus side effect to also use exe_wrapper for those scripts. Fixes: #8187
2021-01-27custom_target: Add env kwargXavier Claessens1-0/+2
2021-01-19rust: Accept generated sources for main.rsDylan Baker1-7/+16
There are still caveats here. Rust/cargo handles generated sources by writing out all targets of a single repo into a single output directory, setting a path to that via a build-time environment variable, and then include those files via a set of functions and macros. Meson's build layout is naturally different, and ninja makes working with environment variables at compile time difficult. Fixes #8157
2021-01-19Replace NinjaBackend is_rust_target with build.uses_rustDylan Baker1-3/+3
we have two functions to do the exact same thing, and they're basically implemented the same way. Instead, let's just use the BuildTarget one, as it's more generally available.
2021-01-13build/interpreter: Split InstallDir to fix layering violationDylan Baker1-1/+16
Currently InstallDir is part of the interpreter, and is an Interpreter object, which is then put in the Build object. This is a layering violation, the interperter should have a Holder for build data. This patch fixes that.
2021-01-13build: Add some type annotationsDylan Baker1-12/+18
2021-01-13build/interperter: Add annotations and move input validation to interpreterDylan Baker1-7/+3
This moves the user input validation to the interpreter, instead of being in the build module, and adds type annotations.
2021-01-04fix LGTM warningsDylan Baker1-2/+2
2021-01-04Use a single coredata dictionary for optionsDylan Baker1-7/+7
This patches takes the options work to it's logical conclusion: A single flat dictionary of OptionKey: UserOptions. This allows us to simplify a large number of cases, as we don't need to check if an option is in this dict or that one (or any of 5 or 6, actually).
2021-01-04use OptionKey for builtin and base optionsDylan Baker1-17/+18
I would have prefered to do these seperatately, but they are combined in some cases, so it was much easier to convert them together. this eliminates the builtins_per_machine dict, as it's duplicated with the OptionKey's machine parameter.
2021-01-04move OptionKey to mesonlibDylan Baker1-2/+2
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-04use OptionKey for compiler_optionsDylan Baker1-5/+7
2020-12-16build/interpreter: Add some type annotationsDylan Baker1-8/+10
2020-12-16build: Use python 3.6 annotation syntax for Build initializerDylan Baker1-10/+10
2020-12-16build: Add annotation for Build.dataDylan Baker1-1/+1
2020-12-16build/interpreter: fix layering violations for ManPagesDylan Baker1-1/+19
Like `install_headers`, `install_man` used the same objects for both the interpreter and the build, this is bad. Let's have two separate objects.
2020-12-16build/interpreter: split representation of HeadersDylan Baker1-1/+30
This was all layering violations before. Now we have Headers in the build module, and a holder in the interpreter. All of the type validation is done in interpreter method for `install_headers`.
2020-12-03Add prelinking support for static libraries.Jussi Pakkanen1-1/+21
2020-11-13run_unittests: use textwrap.dedentDylan Baker1-4/+5
So that editors that can fold code (vim, vscode, etc) can correctly fold functions, instead of getting confused by code that doesn't follow the current indention. Also, it makes the code easier to read.
2020-10-19switch gui_app deprecation to FeatureDeprecatedKwargsPaolo Bonzini1-1/+0
The deprecation message for "gui_app" is appearing for every target rather than just once, and even if the required version is older than 0.56.0. Use @FeatureDeprecatedKwargs to fix both issues.
2020-10-18build: use PIE objects for static libraries if b_staticpic=false but b_pie=truePaolo Bonzini1-7/+11
If static_library is used as a convenience library (e.g. for link_whole) it should in principle not need position independent code. However, if the executables that the libraries is linked to are PIE, the non-PIC objects in the static library will cause linker errors. To avoid this, obey b_pie for static libraries if either b_staticpic=false or they use "pic: false". Without this patch, QEMU cannot use b_staticpic, which causes a slowdown on some QEMU benchmarks up to 20%.
2020-10-15intro: Add extra_files key to intro output (fixes #7310)Daniel Mensinger1-3/+2
2020-10-10Properly handle the case of linking static library with custom targetsSahnvour1-4/+31
2020-10-07Add win_subsystem kwarg. Closes #7765.Jussi Pakkanen1-3/+20
2020-09-22pylint: turn on bad-indentation errorDylan Baker1-4/+4
and fix all of the bad indentation