BOOST_LIBS could become outdated in future versions, which would result
in dependency('boost', modules : [ 'foo' ], required : false) to fail,
although required was set to false. Therefore turn the exception into
log_fail(). If required was set to true, this will still be caught since
is_found remains False.
This also improves logging by printing all invalid module names instead
of only the first one.
f.ex when you don't have the llvm-static package installed, the error
message when generating libs is cryptic and uninformative since we
discard stderr.
Deprecated Meson syntax is not supported.
There are features not yet implemented, like completing
build targets and build options; more on this in the comments.
Mesa has 4 build systems currently, set our version in a file called
VERSION, and read that in to each build system to simplify the release
process. For meson this is accomplished by using run_command within the
project() function declaration itself, and with meson <= 0.43.0 this
works fine. Commit 1b0048a702 makes
scripts that are run through run_command a rebuild dependency, but the
attribute used to store that information is set after the project()
command is processed. This breaks mesa.
The solution is to set that list before calling parse_project.
Fixes#2597
I left a hack patch in a pull request for LLVM, and the result is that
LLVM doesn't link with static builds. The real problem was that some
distros have pkg-config for tinfo, other's don't, so the correct
solution is to use cpp_compiler.find_library if dependency() fails.
Unfortunately, `time.time` and file timestamps are not guaranteed to be
in sync and due to various kernel caches may be different enough to
cause rebuilds to fail [1]. This was masked by older ninja versions that
could not read sub-second timestamps.
[1] https://travis-ci.org/mesonbuild/meson/jobs/296797872
Auto detection was based on parsing gcc's output so we have to
ensure that it is always 'C'.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
Currently, run_target does not get namespaced for each subproject,
unlike executable and others. This means that two subprojects sharing
the same run_target name cause meson to crash.
Fix this by moving the subproject namespacing logic from the BuildTarget
class to the Target class.
With executable(), if the link_with argument has a string as one of it's
elements, meson ends up throwing an AttributeError exception:
...
File "/home/lyudess/Projects/meson/mesonbuild/build.py", line 868, in link
if not t.is_linkable_target():
AttributeError: 'str' object has no attribute 'is_linkable_target'
Which is not very helpful in figuring out where exactly the project is
trying to link against a string instead of an actual link target. So,
fix this by verifying in BuildTarget.link() that each given target is
actually a Target object and not something else.
Additionally, add a simple test case for this in failing tests. At the
moment, this test case just passes unconditionally due to meson throwing
the AttributeError exception and failing as expected. However, this test
case will be useful eventually if we ever end up making failing tests
more strict about failing gracefully (per advice of QuLogic).