aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
AgeCommit message (Collapse)AuthorFilesLines
2021-01-22docs: add documentation snippet for meson test console output changesPaolo Bonzini1-0/+29
2021-01-21interpreter: accept external programs and dependencies for summaryPaolo Bonzini1-0/+4
2021-01-20MSVC and Clang-Cl Compiler Argument CleanupMarios Staikopoulos1-0/+16
This commit performs some cleanup for the msvc and clang-cl arguments. * "Disable Debug" (`/Od`) is no longer manually specified for optimization levels {`0`,`g`} (it is already the default for MSVC). * "Run Time Checking" (`/RTC1`) removed from `debug` buildtype by default * Clang-CL `debug` buildtype arguments now match MSVC arguments * There is now no difference between `buildtype` flags and `debug` + `optimization` flags
2021-01-19Keep buildtype the same even if user changes debug and/or optimization.Jussi Pakkanen1-0/+10
2021-01-17Removal of /ZI on MSVC DebugMarios Staikopoulos1-0/+14
The /ZI flag adds in "Edit and Continue" debug information, which will cause massive slowdown. It is not a flag that we should be adding by default to debug builds. /Zi will still be added.
2021-01-14mtest: allow quickly interrupting the test runPaolo Bonzini1-0/+5
The new behavior of interrupting the longest running test with Ctrl-C is useful when tests hang, but not when the run is completely broken for some reason. Psychology tells us that the user will compulsively spam Ctrl-C in this case, so exit if three Ctrl-C's are detected within a second.
2021-01-12summary: align left, not align middleEli Schwartz1-0/+4
aligning along the left is, I think, what most projects want to do. Aligning along the middle looks subjectively ugly, and objectively prevents me from further indenting an element, e.g. Build information: prefix : /usr sysconfdir : /etc conf file : /etc/myprogram.conf
2021-01-12Allow '//' as project function id due to git bash path conversion.Luke Elliott1-0/+7
See https://stackoverflow.com/questions/54258996/git-bash-string-parameter-with-at-start-is-being-expanded-to-a-file-path
2021-01-05modules: Add an unstable-rust moduleDylan Baker1-0/+4
Like other language specific modules this module is module for holding rust specific helpers. This commit adds a test() function, which simplifies using rust's internal unittest mechanism. Rust tests are generally placed in the same code files as they are testing, in contrast to languages like C/C++ and python which generally place the tests in separate translation units. For meson this is somewhat problematic from a repetition point of view, as the only changes are generally adding --test, and possibly some dependencies. The rustmod.test() method provides a mechanism to remove the repatition: it takes a rust target, copies it, and then addes the `--test` option, then creates a Test() target with the `rust` protocol. You can pass additional dependencies via the `dependencies` keyword. This all makes for a nice, DRY, test definition.
2021-01-05mtest: Add support for rust unit testsDylan Baker1-0/+4
Rust has it's own built in unit test format, which is invoked by compiling a rust executable with the `--test` flag to rustc. The tests are then run by simply invoking that binary. They output a custom test format, which this patch adds parsing support for. This means that we can report each subtest in the junit we generate correctly, which should be helpful for orchestration systems like gitlab and jenkins which can parse junit XML.
2020-12-14mtest: only build what is needed for the testsPaolo Bonzini1-0/+17
It is a usual workflow to fix something and retest to see if it is fixed using a particular test. When tests start to become numerous, it becomes time consuming for "meson test" to relink all of them (and in fact rebuild the whole project) where the user has already specified the tests they want to run, as well as the tests' dependencies. Teach meson to be smart and only build what is needed for the test (or suite) that were specified. Fixes: #7473 Related: #7830
2020-12-03Add prelinking support for static libraries.Jussi Pakkanen1-0/+6
2020-11-24compiler: allow non-built internal dependencies as argumentsPaolo Bonzini1-0/+6
Allow methods on the compiler object to receive internal dependencies, as long as they only specify compiler/linker arguments or other dependencies that satisfy the same requirements. This is useful if you're using internal dependencies to add special "-D" flags such as -DNCURSES_WIDECHAR, -D_XOPEN_SOURCE_EXTENDED or -DGLIB_STATIC_COMPILATION.
2020-11-21Handle cmake dependencies which require a specified versionJason Ekstrand1-0/+5
Some CMake packages fail to find at all if no version is specified. This commit adds a cmake_version parameter to dependency() to allow you to specify the requested version.
2020-11-17Revert "Add thinlto support. Closes #7493."Jussi Pakkanen1-27/+0
This reverts commit 3e6fbde94c1cb8d4e01b7daf0282c315ff0e6c7d.
2020-11-12doc: fix typo [skip ci]Eli Schwartz1-1/+1
2020-11-12interpreter: Add get_keys function for configuration_data (#7887)Jones1-0/+4
2020-11-08Add thinlto support. Closes #7493.Jussi Pakkanen1-0/+27
2020-11-05rust: implement support for --editionDylan Baker1-0/+5
Using the std option, so now `rust_std=..` will work. I've chosen to use "std" even though rust calls these "editions", as meson refers to language versions as "standards", which makes meson feel more uniform, and be less surprising. Fixes: #5100
2020-10-30Bump minimum supported Python version to 3.6. Closes #6297.Jussi Pakkanen1-0/+6
2020-10-30Bump version number for release. This is the 10 000th commit!0.56.0Jussi Pakkanen27-323/+0
2020-10-16Fix consistency in variables kwargXavier Claessens1-0/+12
Share common code to extract the `variables` kwarg in declare_dependency() and pkg.generate().
2020-10-15intro: Add extra_files key to intro output (fixes #7310)Daniel Mensinger1-0/+6
2020-10-13Add wrap mode to disable auto promoteXavier Claessens1-1/+3
2020-10-13Merge wraps from subprojects into wraps from main projectXavier Claessens1-0/+11
wraps from subprojects are now merged into the list of wraps from main project, so they can be used to download dependencies of dependencies instead of having to promote wraps manually. If multiple projects provides the same wrap file, the first one to be configured wins. This also fix usage of sub-subproject that don't have wrap files. We can now configure B when its source tree is at `subprojects/A/subprojects/B/`. This has the implication that we cannot assume that subproject "foo" is at `self.subproject_dir / 'foo'` any more.
2020-10-13include_type: Add CMake subporject dependency method (fixes #6879)Daniel Mensinger1-0/+5
2020-10-13Merge pull request #7816 from mensinda/cmCrossJussi Pakkanen1-0/+8
cmake: Cross compilation support
2020-10-13mtest: Allow filtering tests by subprojectNirbheek Chauhan1-0/+18
You could always specify a list of tests to run by passing the names as arguments to `meson test`. If there were multiple tests with that name (in the same project or different subprojects), all of them would be run. Now you can: 1. Run all tests with the specified name from a specific subproject: `meson test subprojname:testname` 1. Run all tests defined in a specific subproject: `meson test subprojectname:` Also forbid ':' in test names. We already forbid this elsewhere, so should not be a big deal.
2020-10-13cmake: Add cross docsDaniel Mensinger1-0/+8
2020-10-13msubprojects: Handle wrap-file to wrap-git caseXavier Claessens1-1/+6
2020-10-13msubprojects: Handle change of URL in wrap-gitXavier Claessens1-1/+4
2020-10-08dependency: support boolean argument "allow_fallback"Paolo Bonzini1-0/+8
Sometimes, distros want to configure a project so that it does not use any bundled library. In this case, meson.build might want to do something like this, where slirp is a combo option with values auto/system/internal: slirp = dependency('', required: false) if get_option('slirp') != 'internal' slirp = dependency('slirp', required: get_option('slirp') == 'system') endif if not slirp.found() slirp = subproject('libslirp', ...) .variable('...') endif and we cannot use "fallback" because the "system" value should never look for a subproject. This worked until 0.54.x, but in 0.55.x this breaks because of the automatic subproject search. Note that the desired effect here is backwards compared to the policy of doing an automatic search on "required: true"; we only want to do the search if "required" is false! It would be possible to look for the dependency with `required: false` and issue the error manually, but it's ugly and it may produce an error message that looks "different" from Meson's. Instead, with this change it is possible to achieve this effect in an even simpler way: slirp = dependency('slirp', required: get_option('slirp') != 'auto', allow_fallback: get_option('slirp') == 'system' ? false : ['slirp', 'libslirp_dep']) The patch also adds support for "allow_fallback: true", which is simple and enables automatic fallback to a wrap even for non-required dependencies.
2020-10-07Add win_subsystem kwarg. Closes #7765.Jussi Pakkanen1-0/+22
2020-10-05machinefiles: Allow keys to be stored case insensitiveDylan Baker1-0/+6
This is required to make the various keys in the [user options] section work the same as they do in the meson_options.txt file, where we don't have any rules about case sensitivity. There is some risk here. Someone may be relying on this lower by default behavior, and this could break their machine files. Fixes #7731
2020-10-01deprecated get_configtool_variable and get_pkgconfig_variableDylan Baker1-0/+4
The get_variable method is able to do everything they do and more, making it generally more useful. Let's tell people to stop using the old ones.
2020-09-29dependencies/curses: Add a system dependencyDylan Baker1-2/+2
That calls find_library and has_header in conjunction to look for curses implementations that are baked into the system without any other find method.
2020-09-29dependencies/curses: Add support for using the ncurses config toolsDylan Baker1-0/+4
These are mostly duplicated with pkg-config, but maybe someone has one but not another, and they're easy to turn on with the ConfigToolDependency.
2020-09-29Merge pull request #7758 from dcbaker/submit/hdf5-factoryDylan Baker1-0/+9
dependencies/hdf5: Convert to a dependency_factory
2020-09-28Add meson.project_build/source_root() methodsXavier Claessens1-0/+5
2020-09-25dependencies/hdf5: Use the correct compilers for the machineDylan Baker1-0/+3
Instead of the default ones, this is especially important when cross compiling or when using compilers that aren't compatible with the default ones. squash! dependencies/hdf5: Use the actual system compilers
2020-09-25dependencies/hdf5: Convert to a dependency_factoryDylan Baker1-0/+6
Instead of a mega dependency that does everything, use a dependency factory for config-tool and pkg-config
2020-09-23Deprecate meson.build_root() and meson.source_root()Xavier Claessens1-0/+5
Those function are common source of issue when used in a subproject because they point to the parent project root which is rarely what is expected and is a violation of subproject isolation.
2020-09-15Add support for the CompCert C CompilerSebastian Meyer1-0/+3
* Add preliminary support for the CompCert C Compiler The intention is to use this with the picolibc, so some GCC flags are automatically filtered. Since CompCert uses GCC is for linking, those GCC-linker flags which are used by picolibc, are automatically prefixed with '-WUl', so that they're passed to GCC. Squashed commit of the following: commit 4e0ad66dca9de301d2e41e74aea4142afbd1da7d Author: Sebastian Meyer <meyer@absint.com> Date: Mon Aug 31 14:20:39 2020 +0200 remove '-fall' from default arguments, also filter -ftls-model=.* commit 41afa3ccc62ae72824eb319cb8b34b7e6693cb67 Author: Sebastian Meyer <meyer@absint.com> Date: Mon Aug 31 14:13:55 2020 +0200 use regex for filtering ccomp args commit d68d242d0ad22f8bf53923ce849da9b86b696a75 Author: Sebastian Meyer <meyer@absint.com> Date: Mon Aug 31 13:54:36 2020 +0200 filter some gcc arguments commit 982a01756266bddbbd211c54e8dbfa2f43dec38f Author: Sebastian Meyer <meyer@absint.com> Date: Fri Aug 28 15:03:14 2020 +0200 fix ccomp meson configuration commit dce0bea00b1caa094b1ed0c6c77cf6c12f0f58d9 Author: Sebastian Meyer <meyer@absint.com> Date: Thu Aug 27 13:02:19 2020 +0200 add CompCert to meson (does not fully work, yet) * remove unused import and s/cls/self/ fixes the two obvious LGTM warnings * CompCert: Do not ignore unsupported GCC flags Some are safe to ignore, however, as per https://github.com/mesonbuild/meson/pull/7674, they should not be ignored by meson itself. Instead the meson.build should take care to select only those which are actually supported by the compiler. * remove unused variable * Only add arguments once. * Apply suggestions from code review Co-authored-by: Dylan Baker <dylan@pnwbakers.com> * Remove erroneous ' ' from '-o {}'.format() As noticed by @dcbaker * added release note snippet for compcert * properly split parameters As suggested by @dcbaker, these parameters should be properly split into multiple strings. Co-authored-by: Dylan Baker <dylan@pnwbakers.com> * Update add_compcert_compiler.md Added a sentence about the state of the implementation (experimental); use proper markdown * properly separate arguments Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
2020-09-14InternalDependency: Add as_link_whole() methodXavier Claessens1-0/+12
2020-09-13external-project: New module to build configure/make projectsXavier Claessens1-0/+24
This adds an experimental meson module to build projects with other build systems. Closes: #4316
2020-09-10msubprojects: Allow comma separated list of typesXavier Claessens1-3/+4
2020-09-10doc: Update new `meson subprojects` behaviorsXavier Claessens1-0/+27
2020-09-10Add release note snippetJon Turney1-0/+4
2020-09-04introspect: add test dependencies info to test/benchmark JSONPaolo Bonzini1-0/+5
Add the ids of any target that needs to be rebuilt before running the tests as computed by the backend, to the introspection data for tests and benchmarks. This also includes anything that appears on the test's command line. Without this information, IDEs must update the entire build before running any test. They can now instead selectively build the test executable itself and anything that is needed to run it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-02docs: Add a snippet for python 3.5 deprecation [skip ci]Nirbheek Chauhan1-0/+15