Commit Graph

7669 Commits

Author SHA1 Message Date
Daniel Mensinger e55236bde4
cmake: basic AST generation 2019-06-06 18:27:02 +02:00
Daniel Mensinger 5089eb356b
cmake: extract the codemodel 2019-06-06 18:27:01 +02:00
Daniel Mensinger 2039cb708b
cmake: get CMake inputs 2019-06-06 18:27:01 +02:00
Daniel Mensinger 9aae603d1b
cmake: Handle a few more stub messages 2019-06-06 18:27:01 +02:00
Daniel Mensinger ef18afc48b
cmake: configure works 2019-06-06 18:27:01 +02:00
Daniel Mensinger 8d3bd6eea8
cmake: Server handshake 2019-06-06 18:27:01 +02:00
Daniel Mensinger e1863719cb
cmake: Made CMake executable finding availiable for other functions 2019-06-06 18:27:01 +02:00
Daniel Mensinger a9a3b3ffe6
Added method kwarg to subproject 2019-06-06 18:22:26 +02:00
Jussi Pakkanen 09a722c4bd
Merge pull request #5263 from Ericson2314/per-machine-cli-args
Per machine 'build_' and '' options
2019-06-06 19:19:06 +03:00
Christoph Reiter 27c5d9f16f gnome.yelp(): Fix media symlink fallback path
When the media file for a specific language doesn't exist we try to symlink
it to the C one. If symlinking fails we need to fall back to copying the C
one like in the non-symlink case.

The fallback code path didn't set the source so this always failed.

Also check if the C fallback exists before trying to symlink/copy, otherwise
we crash if C isn't the first lang we try.
2019-06-06 19:15:04 +03:00
Jussi Pakkanen 82e36a6bfe Add tests for std usage. Closes #5097.
(cherry picked from commit 27ae70dfaaff1298e68df70098acaa96f7ca748a)
2019-06-05 23:05:49 -04:00
John Ericson af2d7af998 Per machine do 'build.' and '' option prefixes
See the docs/ changes for details.
2019-06-05 23:05:34 -04:00
John Ericson 126100b166 mlog.debug the meson-set PKG_CONFIG_PATH
This is very useful for debugging!
2019-06-05 22:00:47 -04:00
Dylan Baker 5065db86f2 compilers/c: Fix removal of name from Combo options for ICL 2019-06-06 01:57:13 +03:00
Jussi Pakkanen 906aa4cb54
Merge pull request #5436 from dcbaker/cmake-lexer-spaces-in-args
Cmake lexer spaces in args
2019-06-05 22:28:30 +03:00
Daniel Mensinger 94c6da33a7 rewriter: Fix that default_options would not set the correct id
Currently default_options uses "" for the kwarks id, however this
is incorect and it must be "/". Additionally, this error won't be
ignored in the future with "--skip" (this is why the tests were
passing and this wasn't detected earlier).
2019-06-05 22:27:32 +03:00
Marcel Hollerbach 5465fc5e28 ninjabackend: refactor _generate_single_compile
when we are generating the include directories for a build target, then
we are iterating over all include directories, check if they are . or ..
and if not, generate a compile args object for it. However, the join
calls and the generation of the compile object is quite expensive, if we
cache the results of this, then we can _generate_single_compile from 60%
to roughly 50%.
2019-06-03 20:37:27 +03:00
Marcel Hollerbach d6407445b9 backend: refactor get_custom_target_provided_libraries
the problem here is, that get_custom_target_provided_libraries iterated
over all generated sources of a target. In each output we check if this
is a library or not. In projects like EFL we have added a lot of
generated target to many different targets, so the iterating of the
output is rather consistent, with this commit we drop from 19% of the
time spending in get_custom_target_provided_libraries down to 3.51%.
2019-06-03 20:37:27 +03:00
Markus Theil 93f04033c1 subproject: fix update_svn
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
2019-06-03 20:32:55 +03:00
Eli Schwartz 5a0fec13b6 doc: fix typo [skip ci]
Error introduced in commit 8e403e08ac
2019-05-31 12:31:26 -07:00
Dylan Baker 31ab962753 dependencies/cmake: Handle spaces in set_target_properties
this is better, but it's still not perfect. cmake doesn't return quotes
to us in the trace output, and being 100% the same as cmake is pretty
much impossible without that information. What I've done should be a
"good enough" implementation without having to maintain a copy of every
property allowed in cmake, as well as custom properties.
2019-05-30 09:50:55 -07:00
Dylan Baker eaa232987e dependencies/cmake: Handle spaces in set_property calls 2019-05-29 11:25:27 -07:00
Dylan Baker 99b848f469 dependencies/cmake: correctly handle spaces in variable names 2019-05-29 11:25:27 -07:00
Dylan Baker 2e2c3c968c tests: Test the cmake parser more thuroughly
It turns out there are bugs, in particular with spaces in variables...
2019-05-29 11:25:27 -07:00
Michael Hirsch, Ph.D e83084fbfe BUGFIX variable name #5285
handle x86 correctly
2019-05-28 21:55:54 +03:00
Mathieu Duponchelle 12a82e763d interpreter: add fallback argument to subproject.get_variable() 2019-05-28 20:26:54 +03:00
Christoph Reiter 20eb948b97 gnome: make sure the target build directory is passed first for linking
determine_rpath_dirs() can return paths to external dependencies not
in the build dir and passing them first as a link path leads to
g-ir-scanner for example linking against the already installed library
instead of the just built one.

This was reported in g-i: https://gitlab.gnome.org/GNOME/gobject-introspection/issues/272
and comes up quite often when a library adds some new symbols which aren't present in the
system library, which then makes linking fail.

The first place where the order is changed is _scan_gir_targets(), which looks like an unintentional
change in the refactoring in 8377ea45aa

The second place in _get_link_args() has always been that way and only the rpath order is changed,
but it looks to me as if the same rules should apply here too.
2019-05-28 20:25:37 +03:00
Paolo Bonzini 9491878681 meson-introspect: do not include host environment in test/benchmark introspection
The host environment could change between the time "meson setup"
produces intro-tests.json, and the time "meson test" is run.
Including it only adds clutter to the introspection data.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-05-28 20:18:10 +03:00
Dylan Baker 0714ba58c7 coredata: add cmake_prefix_path option 2019-05-27 01:24:08 +03:00
Dylan Baker 0d19d334a8 docs: pkg_config_path is a list not a string
You should pass arguments as a list, ie -Dpkg_config_path=/foo,/bar
and meson will join the paths appropriately for you.
2019-05-27 01:24:08 +03:00
Joel Rosdahl f13e65b93a Update to new ccache URL
ccache’s web site is now located at https://ccache.dev.

Bonus: Use the preferred capitalization “Ccache” instead of “CCache”.
2019-05-27 01:10:57 +03:00
Dylan Baker e3e1d67ad6 dependencies/llvm: Fixup bad output from llvm-config on windows
It turns out that llvm-config on windows can return such wonderful
output as `-LIBDIR:c:\\... c:\\abslute\\path\\to\\lib.lib`, which was
all fine and dandy when we were blindly passing it through, GCC/MinGW
ignored it and MSVC understood it meant `/LIBDIR:`; however, after we
added some code to validate linker arguments, and we have some code
before the validation that tries to remove posix style -L arguments,
resulting in IBDIR:..., which doesn't validate.

This patch fixes up the output of llvm-config so that -LIBDIR: is
replaced by the the link libdir argument of the compiler, via the
compiler/linker method for getting that.

Fixes #5419
2019-05-27 01:10:17 +03:00
Erik Faye-Lund 9b3592a8ba docs/Users: update Mesa link [skip ci]
Mesa's primary home is now in the Freedesktop GitLab instance. The cgit repo is just a mirror.
2019-05-23 21:21:35 +03:00
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
Luís Ferreira 144e7dcf3b dub: add other library target types
Signed-off-by: Luís Ferreira <lsferreira169@gmail.com>
2019-05-22 23:55:35 +03:00
Paolo Bonzini 06b1f457d5 sourceset: add a realistic example as a testcase 2019-05-22 12:10:28 +02: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
Federico Mena Quintero 60f34a1f51 gnome: use g_intern_static_string() for enum/flags type names
We are emitting a static string, so use that shortcut function to
intern it, which will save one allocation.
2019-05-21 21:53:15 +03:00
Jussi Pakkanen 79d530e325 Generators can have extra target dependencies. Closes #4131. 2019-05-20 23:38:13 +03:00
Jussi Pakkanen 60e1676651 Combine the two different pipeline test dirs into one. 2019-05-20 23:38:13 +03:00
Jussi Pakkanen da1f663e8d Reserve build_ prefix in option names. 2019-05-20 22:53:06 +03:00
Jussi Pakkanen ef024583df
Merge pull request #5276 from dcbaker/pkg-config-path-invalidate-cache
coredata: add pkg_config_path to depedency cache key
2019-05-20 22:50:12 +03:00
Jon Turney fb35e6faac Remove compiler data from build object
The actual data is in Coredata (which is serialized) and we just held a
reference in Build for (in)convenience.
2019-05-20 11:29:17 -07:00
Jon Turney 3ff758f22d Switch from build.compiler to environment.coredata.compiler in backends
Switch from build.compiler to environment.coredata.compiler and likewise
from build.cross_compiler to environment.coredata.cross_compiler in
backends. (Only seems to be actually used in ninja backend).
2019-05-20 11:29:17 -07:00
Jon Turney 6d6f6ad5fa Remove a pointless conditional
After #4445, the code in both branches of this conditional is the same.
2019-05-20 11:29:17 -07:00
Jon Turney 58870fda16 Remove compilers from ModuleState object
It doesn't make much sense to have this and not also have
cross-compilers (so any use of this is already pretty suspect as
probably wrong when cross-compiling).

This information is accessible anyhow via environment.coredata.
2019-05-20 11:29:17 -07:00
Dylan Baker 27b6c62ffd fixup! fixup! tests: Add test for Dependency.get_variable 2019-05-20 10:59:26 -07:00