Commit Graph

996 Commits

Author SHA1 Message Date
Jussi Pakkanen 8e403e08ac Use library() instead of rolling your own. [skip ci] 2019-05-23 00:45:51 +03:00
Jussi Pakkanen 77a933faca
Merge pull request #5028 from bonzini/sourceset
new module "sourceset" to match source file lists against configuration data
2019-05-23 00:01:29 +03:00
Michael Hirsch, Ph.D 44b6ccbe56 join_paths => / [skip ci] 2019-05-22 23:56:50 +03:00
Paolo Bonzini d894c48660 new module "sourceset" to match source file lists against configuration data
In QEMU a single set of source files is built against many different
configurations in order to generate many executable.  Each executable
includes a different but overlapping subset of the source files; some
of the files are compiled separately for each output, others are
compiled just once.

Using Makefiles, this is achieved with a complicated mechanism involving
a combination of non-recursive and recursive make; Meson can do better,
but because there are hundreds of such conditional rules, it's important
to keep meson.build files brief and easy to follow.  Therefore, this
commit adds a new module to satisfy this use case while preserving
Meson's declarative nature.

Configurations are mapped to a configuration_data object, and a new
"source set" object is used to store all the rules, and then retrieve
the desired set of sources together with their dependencies.

The test case shows how extract_objects can be used to satisfy both
cases, i.e. when the object files are shared across targets and when
they have to be separate.  In the real-world case, a project would use
two source set objects for the two cases and then do
"executable(..., sources: ... , objects: ...)".  The next commit
adds such an example.
2019-05-22 12:09:09 +02:00
Jussi Pakkanen e9bd7d49bd
Merge pull request #5372 from dcbaker/get_variable
Dependency.get_variable method
2019-05-21 21:57:05 +03:00
Jussi Pakkanen 79d530e325 Generators can have extra target dependencies. Closes #4131. 2019-05-20 23:38:13 +03:00
Dylan Baker c890c947fa fixup! tests: Add test for Dependency.get_variable 2019-05-20 10:41:26 -07:00
Dylan Baker ffe2a678d5 docs: Add docs for Dependency.get_variable 2019-05-20 10:41:11 -07:00
Szunti cf662ded46 Fix typo in Dlang-module.md 2019-05-17 15:16:37 -07:00
Jussi Pakkanen 7b8ef78bc0
Merge pull request #5331 from dcbaker/icl
ICL (Intel for Windows) support
2019-05-14 00:24:48 +03:00
Nirbheek Chauhan b849f6f935 FAQ: Add an entry about the library naming scheme with MSVC [skip ci]
This is very frequently asked.
2019-05-13 23:24:18 +03:00
Dylan Baker 523c7beefc docs/markdown: add snippet for intel-cl support 2019-05-13 11:22:31 -07:00
Dylan Baker be88945ee3 docs/reference-table: Add intel-cl
Because the Intel compiler behaves significantly differently on windows
than it does on Linux and MacOS I've decided it would be better to
follow the clang/clang-cl split and make id "intel-cl" on windows
(leaving "intel" alone on Linux and Mac). Since we've never supported
ICL and it hasn't worked in the past I think this is an okay change to
make.
2019-05-13 11:22:31 -07:00
Jussi Pakkanen 1ff6a8b5d5 Add entry for random design points. [skip ci] 2019-05-12 00:30:08 +03:00
Daniel Eklöf c2ee82cc41 add support for "target_type: 'shared_module'" in build_target() 2019-05-09 22:43:10 +03:00
Jussi Pakkanen d31db565e1 Add white border to logo used on web pages. [skip ci] 2019-05-05 23:07:49 +03:00
nicole mazzuca 24d5c73b0a add -fno-exceptions if cpp_eh=none is specified 2019-05-05 21:19:04 +03:00
Amit D 128d313b66 Update Users.md [skip ci] (#5358) 2019-05-04 14:59:48 +00:00
Michael Hirsch, Ph.D 06bfc2dab6 per-target manual specification of link_language 2019-05-02 23:26:51 +03:00
Nicole Mazzuca 16463046b1 Add vc++ cpp_std flags to the documentation 2019-05-02 13:23:19 -07:00
Jussi Pakkanen 7059c47aad
Merge pull request #5161 from TheQwertiest/feature/custom_target_link
Can link against custom_target[i]
2019-05-02 22:21:56 +03:00
Jussi Pakkanen ec757492bf Describe how to add support for new compilers. [skip ci] 2019-05-02 21:58:03 +03:00
TheQwertiest 68a8481a05 Updated docs with information about `custom_target[i]` 2019-04-29 16:07:50 +03:00
Jon Turney ccc4ce28cc consistent invalid escape sequence behaviour
* docs: document unrecognized escape sequence behaviour [skip ci]

Document that unrecognized escape sequence behaviour is like python, not
C.

* Don't try to decode invalid hex escape sequences

Don't try to decode escape sequences which should contain a sequence of
hex digits, but don't, throwing a python exception.  These will treated
literally instead.

* Extend test case to cover invalid escape sequences
2019-04-28 23:06:36 +03:00
Jussi Pakkanen bbd67bbae9 Rewrap text. [skip ci] 2019-04-24 23:19:13 +03:00
Richard Kjerstadius ccaa61ec52 doc: Update coverage related documentation 2019-04-24 20:32:19 +02:00
Fernando Ramos d81dfcba74 Add support for the Xtensa toolchain
From (almost) all points of view, the Xtensa toolchain can be treated as
a regular GCC toolchain.

This patch adds very basic support so that, at least, meson does not
fail when trying to use "xt-xcc" (which makes it possible to use it
without problems).
2019-04-22 18:24:47 +03:00
Konstantin 841995cddf i18n: add args keyword to merge_file
* i18n: add args keyword to merge_file

* i18n: add testcase to msgfmt args
2019-04-22 14:54:05 +03:00
Jussi Pakkanen 8dedddca36 Fix table layout. [skip ci] 2019-04-22 00:48:41 +03:00
Vladimír Čunát e4f3894582 dist: recurse into git submodules 2019-04-21 23:13:01 +03:00
Jussi Pakkanen 91654674f0
Merge pull request #5289 from mesonbuild/fixxpass
Report xpass results as failures.
2019-04-21 15:15:19 +03:00
Jussi Pakkanen dc2044c56d Report xpass results as failures. 2019-04-21 03:01:04 +03:00
Anton Kochkov ad0ba6a911 Add VS2019 backend CI and docs. 2019-04-16 00:11:02 +03:00
Eli Schwartz f5bc0ab44a fix gpgme support by preferring pkg-config where possible
Since gpgme 1.13.0, pkg-config files are available and this is the
preferred way to detect the dependency. Without this, projects that wish
to generate pkg-config files that Requires.private on gpgme, now have
their custom dependency() fallbacks overridden with an incorrect
configtool dependency.
2019-04-15 11:09:49 -07:00
Keefer Rourke 53a7403f10 (#5260) link to builtin options in `library()` fn
As a newcomer to the Meson build system, I found the documentation of the `library()` function to be a bit misleading. Eventually I found what 'user option' referred to after digging through the docs.

This just adds a link back to the page that describes the options that are referred to in this paragraph.
2019-04-15 20:39:16 +03:00
Dylan Baker 79e925b8f6 docs/fallback-wraptool: wrap to 80 characters 2019-04-14 20:54:38 +03:00
Dylan Baker 68f5bfea62 docs: update fallback wraptool docs [skip ci]
Fixes #5229
2019-04-14 20:54:38 +03:00
jrl64 a2d222c383 Update Built-in Option c_std for C17. Closes #4842. 2019-04-10 23:14:51 +03:00
Dylan Baker 02ff9829c4 docs: Change 0.51 to 0.50.1 [skip ci]
Since this is targeting the 0.50.1 bugfix release.
2019-04-10 19:30:18 +03:00
TheQwertiest 52fa6152cd [docs] Reordered options and fixed a typo [skip ci] 2019-04-10 19:29:25 +03:00
Dylan Baker 67ca2d5bdc docs: Document pkg_config_path and cross_ options [skip ci] 2019-04-09 16:34:10 +00:00
Daniel Mensinger d72d98d3af mintro: removed deprecated --target-files API 2019-04-08 21:06:15 +03:00
Jussi Pakkanen 93f756ec25
Merge pull request #5176 from ao2/add-subproject-foreach-command
Add 'meson subprojects foreach' command
2019-04-08 20:42:03 +03:00
Jan Tojnar e8a688428d Add gpgme-config support
GPGME does not support pkg-config so we need config-tool support if
we do not want projects like Almanah and Seahorse to parse the values
manually.
2019-04-06 22:35:10 +03:00
Andrei Alexeyev 8209180c76 Add shaderc dependency lookup logic 2019-04-02 22:47:10 +03:00
Jussi Pakkanen 75219989ca
Merge pull request #5128 from Ericson2314/sanity-check-with-flags
Sanity check with external args
2019-04-02 00:40:05 +03:00
Antonio Ospite 221fb86373 docs: fix typo s/responsability/responsibility/ [skip ci] 2019-04-01 11:51:02 +02:00
Antonio Ospite e680dbe065 Add 'meson subprojects foreach' command
Sometimes it is convenient to run an arbitrary command (e.g. 'git diff')
on all subprojects.

Add a 'meson subprojects foreach' command to take care of that.

For this command the common argument 'subprojects' does not make sense,
so only add '--sourcedir' and cover the case of a missing
options.subprojects in run().
2019-04-01 11:51:02 +02:00
Jussi Pakkanen 5905533fcd
Merge pull request #5103 from mesonbuild/linkcustom
Can link against custom targets
2019-04-01 01:29:51 +03:00
Jonatan Pålsson 2a030e33f3 docs: Document when environment() was added (#5178) [skip ci]
The environment() function was added in 0.35.0 (which contains a2e7ebc5,
containing the actual addition)
2019-03-30 09:28:04 +00:00
Dylan Baker f2d4a32370 dependencies/base: Pass correct arguments to subdependencies
Currently InternalDependency.get_partial_dependency shadows the the
input variables names, and then passes those new copies to the final
object returned. It also passes them to the arguments of of
get_partial_dependency for each subdependency, which is wrong. The
code is supposed to proxy the original argumetn values to that instead
of the shadowing values.

To avoid that this patch renames the new values.
2019-03-29 21:27:54 +00:00
TheQwertiest c0d287c1bf [Docs] Built-in options page cleanup (fixes #5165) [skip ci]
- Added missing universal options.
- Split options in `directories` and `core` groups.
- Sorted alphabetically some of the groups.
- Removed `cross-file` from options, since it's not an option.
2019-03-29 21:44:16 +02:00
Will Thompson 3b7ec01692 docs: correct “It's” to “Its” [skip ci] 2019-03-29 13:33:35 +00:00
Jussi Pakkanen 2259db2683 Add documentation. 2019-03-28 23:11:30 +02:00
John Ericson 8c3d24e9de release note snippet for user flags in sanity checks [skip ci] 2019-03-27 10:54:56 -04:00
John Ericson b565eff084 Add release note snippit for CPPFLAGS handing [skip ci] 2019-03-27 14:45:42 +00:00
Dylan Baker d88bf0eb80 compilers: n_debug=if-release and buildtype=plain should not enable assertions
It's a bit odd that it doesn't, and has resulted in bugs in distro
packaging.

Fixes #5141
2019-03-26 22:17:27 +02:00
Jussi Pakkanen ed5992a10d
Merge pull request #5031 from bonzini/kconfig
Kconfig Module
2019-03-20 22:03:47 +02:00
Ross Burton 65e59c84a1 mesonbuild: allow multiple --cross-file options
Just like --native-file, allow multiple --cross-file options.  This is mostly
unifying the logic between cross_files and config_files.
2019-03-20 10:06:17 +00:00
Jussi Pakkanen 4b95dd3a6d Add test script to generate a static library with a custom target. 2019-03-18 22:01:06 +02:00
Paolo Bonzini 49076d719c kconfig: improvements for builddir config file
Document best practices for per-builddir config file, and add a test covering
loading a config file from the build directory.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-03-15 11:43:05 +01:00
Mark Schulte 647bd2839e [modules] Add kconfig module
Add a kconfig module to allow meson to integrate with existing projects
that use kconfig.
2019-03-15 11:42:36 +01:00
Kieran Bingham 33af335949 Add libcamera to Users.md [skip ci]
Add the libcamera project as a user of Meson.
2019-03-14 23:39:28 +02:00
Michael Hirsch, Ph.D e491792a95
docs 2019-03-14 02:04:25 -04:00
Tomas Krizek 4adadadb91 docs/Users: add Knot Resolver to projects 2019-03-13 12:51:17 -07:00
Tomas Krizek 9641a3d289 docs/Users: fix sort order (Kiwix libraries) 2019-03-13 12:51:17 -07:00
Niklas Claesson dd2c44cdf6 Add static as keyword to find_library 2019-03-11 20:56:52 +02:00
Nirbheek Chauhan a0be869bb9
docs: Typos and formatting in the 0.50 release notes [skip ci] 2019-03-11 21:35:46 +05:30
Thomas DeRensis 86a7d67179 docs: Add missing closing quote [skip ci] 2019-03-11 15:18:31 +00:00
Will Thompson ca355a79fb docs: fix typo in link anchor [skip ci] 2019-03-10 20:01:43 +00:00
Jussi Pakkanen 9f48f5fe94 Update everything for new release. 2019-03-10 19:25:09 +02:00
Amit D 2bec1633fc Update Users.md [skip ci] 2019-03-10 18:46:31 +02:00
Jussi Pakkanen 5a4defadab Generate release notes from snippets automatically. [skip ci] 2019-03-10 18:40:27 +02:00
Eli Schwartz 311cbf347b pkgconfig.generate: add FeatureNew and documentation for implict version
The documentation for this change was left out of its implementation in
commit b4aee4675a and was later documented
in commit f831c05b55 as if it had always
existed.
2019-03-09 19:39:51 +02:00
Dylan Baker e42e19702c docs: Add snippet for python module path method [skip ci]
Which somehow wasn't included in the original pull request.
2019-03-09 19:01:57 +02:00
Dylan Baker bd6bae0c71 docs: document that the .path() method for Python is new in 0.50 [skip ci]
Since this method was not included in 0.46-00.49 we should document that.
2019-03-09 19:01:57 +02:00
Amit D 068217a385 Update Users.md [skip ci] 2019-03-06 22:42:14 +02:00
Jussi Pakkanen 94bb29738e
Merge pull request #4992 from mensinda/rwCLI
rewriter: Add a CLI and docs
2019-03-04 17:49:32 +02:00
Daniel Mensinger 17ce9bc0e5 docs: Define sorting in Style-guide.md [skip ci] 2019-03-04 17:49:02 +02:00
Daniel Mensinger 594bf678c7
rewriter: Require '/' for the project ID 2019-03-04 13:00:30 +01:00
Daniel Mensinger 976c136ab6
rewriter: Mark the CLI as experimental 2019-03-04 13:00:30 +01:00
Daniel Mensinger 0a3b91c1c9
rewriter: Mark the info output as experimental 2019-03-04 13:00:30 +01:00
Daniel Mensinger dd5791309e
rewriter: Document info operation 2019-03-04 13:00:30 +01:00
Daniel Mensinger e724fd5438
rewriter: Handle duplicate target 2019-03-04 13:00:29 +01:00
Daniel Mensinger ff5e7eb104
rewriter: Updated docs 2019-03-04 13:00:07 +01:00
Daniel Mensinger 90b557e38a
rewriter: Remove command alias 2019-03-04 13:00:07 +01:00
Daniel Mensinger 1290330894
rewriter: Renamed tgt_{add,rm} --> target_{add,rm} 2019-03-04 13:00:06 +01:00
Daniel Mensinger c98987c19e
rewriter: Fixed docs. 2019-03-04 13:00:06 +01:00
Daniel Mensinger eabc35340d
rewriter: Enforce an empty project ID string 2019-03-04 13:00:06 +01:00
Daniel Mensinger d4fe805a51
rewriter: Added docs 2019-03-04 13:00:06 +01:00
Jussi Pakkanen 81f0eef2df Add table for dependency method types. [skip ci] 2019-03-04 11:25:50 +02:00
Daniel Mensinger 7074f12644
mintro: Renamed --dependencies --> --scan-dependencies 2019-03-03 23:19:04 +01:00
Daniel Mensinger f29f854861
Added docs 2019-03-03 23:19:03 +01:00
Paolo Bonzini 91f847d308 mtest: implement TAP parsing
This provides an initial support for parsing TAP output.  It detects failures
and skipped tests without relying on exit code, as well as early termination
of the test due to an error or a crash.

For now, subtests are not recorded in the TestRun object.  However, because the
TAP output goes on stdout, it is printed by --print-errorlogs when a test does
not behave as expected.  Handling subtests as TestRuns, and serializing them
to JSON, can be added later.

The parser was written specifically for Meson, and comes with its own
test suite.

Fixes #2923.
2019-03-02 09:07:54 +01:00
Paolo Bonzini f2e513791e mtest: add support for hard errors
Hard errors also come from the GNU Automake test protocol.  They happen when
e.g., the set-up of a test case scenario fails, or when some
other unexpected or highly undesirable condition is encountered.

TAP will use them for parse errors too.  Add them to the exitcode protocol
first.
2019-03-02 09:07:54 +01:00
Paolo Bonzini 4b5cf3f7c5 interpreter: add "protocol" kwarg to test
This is the first step towards adding support for TAP.
2019-03-02 09:07:54 +01:00
Daniel Schulte f0b0bcf86d mintro: Add subproject_dir to --projectinfo 2019-03-01 23:40:33 +02:00
Daniel Schulte 924cf5e622 mintro: Add name of subproject the target is contained in to --target output 2019-03-01 22:29:52 +02:00
Nicolas Schneider ded0defc3f auto generate msvc pch source file if none is provided by the user 2019-03-01 21:50:31 +02:00
Jussi Pakkanen a322dc534b Revert "Improve declare_dependency() example in Generating-sources.md [skip ci]"
This reverts commit 67a01c8d7f.
2019-02-28 22:41:06 +02:00