Commit Graph

66 Commits

Author SHA1 Message Date
Dylan Baker cadf5f3c04 llvm: Add optional modules
These will become more relevant later in the series.
2017-10-25 10:03:34 -07:00
Dylan Baker 7841210b4f llvm: Add helper function for checking modules
This will be used in a later patch.
2017-10-25 10:03:34 -07:00
Dylan Baker 9262236322 llvm: strip system libraries from link arguments
v2: - use clang and gcc's -print-system-libs option as suggested by
      Daniel Stone.

Fixes #2437
2017-10-21 10:36:00 -07:00
Dylan Baker e8df59cc5f llvm: don't add --system-libs
On LLVM < 4.0 this adds linker arguments like -lm, which we don't want.

Related #2442, 2437
2017-10-07 18:00:57 +03:00
Nirbheek Chauhan bb0e18b738 Use listify and extract_as_list everywhere
They now flatten by default and unhold objects if required

Includes unit tests.
2017-10-01 22:27:48 +05:30
Dylan Baker 5a8d1b6431 deps: strip 'svn' from LLVM version 2017-09-26 17:12:49 -07:00
Dylan Baker 035bee5c54 deps: demote LLVM config to instance variable
Which fixes trying to use multiple versions of LLVM, and allows
simplifying the class somewhat.
2017-09-26 13:06:22 -07:00
Dylan Baker 95ba1fcab2 deps: convert LLVM modules to a set before checking for them
This allows the logic in a meson.build file to be simplified (ie, some
dependencies can add the same module requirements) but meson will only
check for them once. Since set is inherently unordered, use sorted to
make the output deterministic.
2017-09-26 13:06:22 -07:00
Dylan Baker ce6099b704 deps: flatten module argument to LLVM dependency
So that nested lists can be passed.
2017-09-26 13:06:16 -07:00
Nirbheek Chauhan ea3e28dbb9 valgrind: Fix __init__ call
Adds a test so that this is catched later.

Closes https://github.com/mesonbuild/meson/issues/1937
2017-06-17 12:33:06 +03:00
Nirbheek Chauhan 38716f0fcb tests: Improve llvm dependency test coverage 2017-06-09 20:21:01 +05:30
Nirbheek Chauhan 0c83f8352d dependencies: Add a new class ExternalDependency
This class now consolidates a lot of the logic that each external
dependency was duplicating in its class definition.

All external dependencies now set:

* self.version
* self.compile_args and self.link_args
* self.is_found (if found)
* self.sources
* etc

And the abstract ExternalDependency class defines the methods that
will fetch those properties. Some classes still override that for
various reasons, but those should also be migrated to properties as
far as possible.

Next step is to consolidate and standardize the way in which we call
'configuration binaries' such as sdl2-config, llvm-config, pkg-config,
etc. Currently each class has to duplicate code involved with that
even though the format is very similar.

Currently only pkg-config supports multiple version requirements, and
some classes don't even properly check the version requirement. That
will also become easier now.
2017-06-09 20:21:01 +05:30
Ting-Wei Lan 139152b0ef Update the list of possible llvm-config binaries
This commit syncs the list with gnome-builder, which updates its list
in https://bugzilla.gnome.org/show_bug.cgi?id=782296.

llvm-config40 is added becaue LLVM 4.0 becomes a stable release.
llvm-config-5.0 is added to the bottom of the list because it is still
a development snapshot (svn trunk).
2017-06-07 19:54:45 +03:00
Lars Persson a3856be1d5 gmockdependency: find libraries using the compiler
Use the compiler object to find the gmock library. Fixes following
cases:
- cross compiling looked in host library paths
- static libgmock was not supported

Change-Id: Ie3912b8b4dd3b71d7a5ae2adae7295d3b685fddf
2017-05-14 19:01:14 +03:00
Lars Persson a1a4f66e6d gtestdependency: find libraries using the compiler
Use the compiler object to find gtest libraries. Fixes following
cases:
- cross compiling looked in host library paths
- static libgtest was not supported

Change-Id: If42cdf873db38676b99adca60752f652aff097a2
2017-05-14 19:01:14 +03:00
Elliott Sales de Andrade d96b16c24b Split development-related deps into their own file. 2017-05-09 18:13:10 -04:00