aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-02-06modules/rust: use typed_pos_argsDylan Baker1-10/+5
2021-02-06interpreterbase: Add support for optional arguments to typed_pos_argsDylan Baker2-2/+98
This allows representing functions like assert(), which take optional positional arguments, which are not variadic. More importnatly you can represent a function like (* means optional, but possitional): ```txt func(str, *int, *str) ``` typed_pos_args will check that all of your types are correct, and if not provide None, which allow simplifying a number of implementation details
2021-02-06interpreterbase: Add support for variadic arguments to typed_pos_argsDylan Baker2-7/+131
This allows functions like `files()` to be decorated.
2021-02-06interpreterbase: Add a helper method for typing positional argumentsDylan Baker2-0/+89
We don't do a very good job of type checking in the interpreter, sometimes we leave it to the mid layers of backends to do that (layering violations) and sometimes we just don't check them at all. When we do check them it's a ton of boilerplate and complicates the code. This should help quite a bit.
2021-02-06interpreter: use noPosArgs and noKwargs instead of opencodingDylan Baker1-8/+6
2021-02-06add loongarch supportXiaotian Wu3-1/+4
2021-02-05run_unittests: fix misc lint errors due to whitespace or unused imports/argsEli Schwartz1-5/+3
2021-02-05run_unittests: fix undefined variable in error messageEli Schwartz1-1/+1
In commit fe973d9fc45581f20fefc41fc0b8eb0066c0129d, some uses of p got rewritten to compiler.language, but not all. We'd still raise an error message, but for the wrong thing. o_O
2021-02-05run_unittests: remove double definition of the same test caseEli Schwartz1-16/+0
In commit 591e6e94b9fccfc49ee7093cb21735a27fd64005 we somehow ended up with an identical extra copy.
2021-02-05tests/cmake: disable some tests that don't work correctly when cross compilingDylan Baker3-0/+12
2021-02-05unittests: fix error message stringDylan Baker1-3/+13
2021-02-05vala: Disable unity buildsDylan Baker3-14/+20
Our approach to unity builds with vala is broken, you cannot unify the generated C files, as they contain duplicate symbols. We would need to instead combine the files while they are still in their vala form, then convert that to C and compile the unified C file. This does not fix the linked issue, as this removed the ability to do vala unity builds, but it does allow running vala with `--unity=on`. Related: #5280
2021-02-05ninjabackend: add a few annotationsDylan Baker1-5/+7
2021-02-05ci: fix yaml syntax errorDylan Baker1-0/+1
2021-02-05ninjabackend: Remove useless call to replace_paths()Xavier Claessens2-5/+4
Replacements are already done by eval_custom_target_command() and must be done BEFORE calling as_meson_exe_cmdline() anyway. replace_paths() is still used by generators. Make eval_custom_target_command() more readable by handling error in the final else case instead of in the middle of elif.
2021-02-05backend: Do not check for exe wrapper twiceXavier Claessens3-17/+4
It is already checked by as_meson_exe_cmdline().
2021-02-05run_target: Add env kwargXavier Claessens14-219/+123
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-05gnome: Add post_install() methodXavier Claessens3-18/+93
Various GNOME projects have scripts that does similar task, better do it directly in meson. This ensures it's done correctly regarding usage of subprojects and pkg-config. See for example this gtk bug: https://gitlab.gnome.org/GNOME/gtk/-/issues/3626. Fixes: #8268
2021-02-04xcode-backend: add implicit includesJeff Moguillansky3-14/+18
Move helper functions get_source_dir_include_args and get_build_dir_include_args to backend base class
2021-02-04xcode-backend: set global link argsJeff Moguillansky1-0/+3
2021-02-04xcode-backend: fix include pathsJeff Moguillansky1-1/+2
Add project directory as include path Add include paths from dependencies for all languages (c, c++, objc, objc++)
2021-02-04Introduce `fs.read` to read a file as a stringLuke Drummond10-2/+159
Following #7890, this patch introduces the ability to read the contents of a file to the fs module. This patch introduces the ability to read files at configure time, but has some restrictions: - binary files are not supported (I don't think this will prove a problem, and if people are wanting to do something with binary files, they should probably be shelling out to their own script). - Only files outside the build directory allowed. This limitation should prevent build loops. Given that reading an arbitrary file at configure time can affect the configuration in almost arbitrary ways, meson should force a reconfigure when the given file changes. This is non-configurable, but this can easily be changed with a future keyword argument.
2021-02-04minstall: Add --dry-run optionXavier Claessens3-29/+118
Closes: #1281
2021-02-03Fix some typos in the release notes snippetsLuca Weiss3-4/+4
2021-02-03environment: fix typosAli Alnubani1-4/+4
Fixed typos and reworded some sentences. Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
2021-02-02Merge pull request #8087 from dcbaker/submit/lto-extensionsJussi Pakkanen7-26/+140
Add option for thinLTO
2021-02-02doc: fix typosEli Schwartz1-2/+2
2021-02-02Add support for LLVM's thinLTODylan Baker6-8/+54
This uses a separate option, b_lto_mode. It works in conjunction with b_lto_threads. Fixes #7493
2021-02-02compilers: Add support for using multiple threads with ltoDylan Baker6-25/+93
Both Clang and GCC support using multiple threads for preforming link time optimizaions, and they can now be configured using the `-Db_lto_threads` option. Fixes #7820
2021-02-02Quick update of table of CUDA Toolkit vs. NVIDIA driver versions.Olexa Bilaniuk1-0/+2
2021-02-02interpreter, mtest: introduce add_test_setup(exclude_suites: ...)Paolo Bonzini6-15/+38
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-02mtest: extract get_test_setup, rename merge_suite_optionsPaolo Bonzini1-10/+13
merge_suite_options is really about test setups, so rename accordingly. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-02-02mtest: load build data earlyPaolo Bonzini1-23/+21
This will be needed to exclude testsuites from test setups (which are stored in the build data). While at it, since a chdir is needed simplify a bit the loading of tests and benchmarks.
2021-02-02mtest: compute logfile name earlyPaolo Bonzini1-15/+18
Do this before overriding self.options.setup with the default setup.
2021-02-02mtest: remove useless argumentPaolo Bonzini1-3/+3
2021-02-02build: fix flake8Paolo Bonzini1-2/+1
2021-02-01bugfix concerning octal umasks (#8282)Volker-Weissmann1-4/+11
* bugfix concerning octal umasks * minor fix * spelling mistake
2021-02-01tests/common: fix " 37 has function" test on musl systems.Érico Rolim1-12/+21
This commit fixes the test that asserts on whether the lchmod() function should have been detected as available by Meson. It does so by assuming that on Linux systems not using glibc, the function will be available. - fix comment about lchmod on Linux: musl has implemented the function correctly since 2013, so the assumption in the test wasn't correct. Furthermore, musl doesn't use glibc's stub mechanism. - fix include to receive __GLIBC__ definition: including almost any header in glibc will end up defining __GLIBC__, since most headers include <features.h>. The <gnu/libc-version.h> header was probably chosen because of its name, but its actual purpose is defining functions for checking glibc version at runtime (instead of what the binary was built with), so it isn't necessary to use it. Since it is a completely non standard header, including it makes the test suite fail on musl due to not finding the header.
2021-01-31Capitalize "Meson" consistently as it is a proper name. [skip ci]Jussi Pakkanen51-174/+174
2021-01-31copy editing for 0.57 release notes [skip ci]Paolo Bonzini15-43/+46
2021-01-30add_install_script: add skip_if_destdir kwargXavier Claessens5-4/+28
It is common, at least in GNOME projects, to have scripts that must be run only in the final destination, to update system icon cache, etc. Skipping them from Meson ensures we can properly log that they have not been run instead of relying on such scripts to to it (they don't always).
2021-01-30minstall: Add --destdir command line optionXavier Claessens1-0/+7
2021-01-30Rewrap long text lines in docs. [skip ci]Jussi Pakkanen100-2649/+3566
2021-01-30build: add function get_build_targets to Build classJeff Moguillansky2-33/+40
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-30Merge pull request #8264 from xclaesse/ep-miscJussi Pakkanen5-27/+62
external_project: misc improvements
2021-01-30Merge pull request #8200 from bonzini/mtest-asyncio-logsJussi Pakkanen3-116/+264
mtest: improvements to logging
2021-01-30Fix executable as script on WindowsXavier Claessens13-81/+103
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-29external_project: Add release snippetXavier Claessens1-0/+11
2021-01-29Change the Eoan CI to ubuntu rolling ciDylan Baker5-10/+7
This makes the Ubuntu CI always use the latest release, without us having to manually change it.
2021-01-29workflows/os_comp: Don't run if there aren't relavent changesDylan Baker1-1/+13