aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
AgeCommit message (Collapse)AuthorFilesLines
2018-07-18Can upgrade build directory from an old version.builddirupgradeJussi Pakkanen9-6/+139
2018-07-13Avoid concatenating two options in listThomas Hindoe Paaboel Andersen1-1/+1
'c++17' and 'gnu++98' were concatenated due to a missing comma
2018-07-11gnome.gdbus_codegen: Handle XML docbook in subdirsNirbheek Chauhan2-2/+2
Closes https://github.com/mesonbuild/meson/issues/3870
2018-07-10Implement get_link_whole_for() for IntelCompiler (#3863)Alberto Sartori1-0/+3
closes #3862
2018-07-10find_library: Validate and sort globbed shared library filesNirbheek Chauhan1-2/+19
We need to pick the library with the highest version, which is what the OpenBSD linker also does. https://github.com/mesonbuild/meson/issues/3570#issuecomment-403638752
2018-07-09Fix directory verification. Closes #3857.Jussi Pakkanen1-2/+11
2018-07-09Fix searching of shared libraries on OpenBSD (#3851)Nirbheek Chauhan4-53/+119
* get_library_naming: Use templates instead of suffix/prefix pairs This commit does not change functionality, and merely sets the groundwork for a more flexibly naming implementation. * find_library: Fix manual searching on OpenBSD On OpenBSD, shared libraries are called libfoo.so.X.Y where X is the major version and Y is the minor version. We were assuming that it's libfoo.so and not finding shared libraries at all while doing manual searching, which meant we'd link statically instead. See: https://www.openbsd.org/faq/ports/specialtopics.html#SharedLibs Now we use file globbing to do searching, and pick the first one that's a real file. Closes https://github.com/mesonbuild/meson/issues/3844 * find_library: Fix priority of library search in OpenBSD Also add unit tests for the library naming function so that it's absolutely clear what the priority list of naming is. Testing is done with mocking on Linux to ensure that local testing is easy
2018-07-08Add missing method on external library object: type_name() (#3845)Nirbheek Chauhan2-1/+7
For some reason this was missing, but it should've always existed since cc.find_library() returns an object that is internally an ExternalDependency instance.
2018-07-07Print a more usable message when a subproject fails to configureNirbheek Chauhan4-8/+24
Instead of just printing the message in the exception, if it's a MesonException, also print the file and the line number. If it's an unknown exception, print the entire traceback so that we can pin-point what the Meson bug causing it is.
2018-07-07Raise a MesonException when substituting an invalid valueNirbheek Chauhan2-3/+11
Avoids throwing a traceback. Also, warn when setting such a value.
2018-07-07Add new method: mlog.deprecation()Nirbheek Chauhan6-7/+12
Instead of constructing it manually, use a helper.
2018-07-07Merge pull request #3763 from noverby/wip/noverby/jar-linking-manifestJussi Pakkanen3-2/+38
java: support for linking jar files (using manifest)
2018-07-07Ask for more details when warning about unknown arch [skip appveyor]Nirbheek Chauhan1-1/+3
2018-07-07Canonicalise 64-bit PowerPC CPU families to "ppc64"Ross Burton1-1/+2
Instead of exposing the endianness in the CPU family, canonicalise the CPU family to just "ppc64" to match MIPS (which is also bi-endian). Part of the work for #3842.
2018-07-06mlog: Log timestamps in profile-self modeNirbheek Chauhan2-1/+15
This makes it much clearer which statements are taking a long time, and helps in interpreting the outputted profile itself.
2018-07-06mlog: Add built-in support for quoting bolded messagesNirbheek Chauhan2-25/+31
This allows us to drop wonky sep='' hacks and manual addition of spaces across the codebase.
2018-07-06gnome.gtkdoc: Don't treat install_dir as a file optionNirbheek Chauhan1-1/+1
Causes the value to be expanded to current source directory. Fixes https://github.com/mesonbuild/meson/issues/3829
2018-07-05Fix flake8 issues (#3834)Jon Turney4-3/+2
* Fix flake8 whitespace reports $ flake8 | grep -E '(E203|E221|E226|E303|W291|W293)' ./mesonbuild/coredata.py:337:5: E303 too many blank lines (2) * Fix flake8 'variable assigned value but unused' reports $ flake8 | grep -E F841 ./mesonbuild/modules/gnome.py:922:9: F841 local variable 'target_name' is assigned to but never used * Fix flake8 'imported but unused' reports $ flake8 | grep F401 ./mesonbuild/compilers/__init__.py:128:1: F401 '.c.ArmclangCCompiler' imported but unused ./mesonbuild/compilers/__init__.py:138:1: F401 '.cpp.ArmclangCPPCompiler' imported but unused ./mesonbuild/modules/__init__.py:4:1: F401 '..mlog' imported but unused PR #3717 imports ARMCLANG compilers in __init__, but does not add them to __all__, so they are not re-exported by the compilers package like everything else. * More details about flake8 in Contributing.md Mention that Sider runs flake8 Suggest seting flake8 as a pre-commit hook
2018-07-04Fix pkexec command for installation via polkitXi Ruoyao1-1/+1
2018-07-04find_library: Only run link test on system dirsNirbheek Chauhan1-11/+16
Paths provided to us by the user or by pkg-config can be (and must be) assumed to be usable since they might not be usable standalone. Closes https://github.com/mesonbuild/meson/issues/3832
2018-07-04configure_file: Don't optimize away substitutionsNirbheek Chauhan2-19/+17
It's possible that the configuration data object has components added conditionally, and that sometimes an empty configuration data object is passed on purpose. Instead, we do the substitution and also warn if no tokens were found that could've been substituted. Closes https://github.com/mesonbuild/meson/issues/3826
2018-07-03java: prevent creation of manifest duplicate in jarNiclas Moeslund Overby1-1/+1
2018-07-03java: remove manifest classpath from installed jarNiclas Moeslund Overby1-0/+14
2018-07-03java: add jar linking testNiclas Moeslund Overby1-3/+3
2018-07-03java: implement java linkingNiclas Moeslund Overby2-2/+24
2018-07-03prune nonexistent dirs from library search pathBruce Richardson1-1/+1
Rather than storing in the cache of search paths the full list returned from the compiler and having each call ignore the non-existent ones, remove from the list all non-existent ones before returning to the caching function.
2018-07-02Bump version number for new development. [skip ci]Jussi Pakkanen1-1/+1
2018-07-02Update everything for new release.0.47.0Jussi Pakkanen1-1/+1
2018-07-02Contributing.md: Document procedure for new features [skip ci]Nirbheek Chauhan1-1/+1
2018-07-02FeatureNew: Make all checks subproject-specificNirbheek Chauhan8-148/+178
We now pass the current subproject to every FeatureNew and FeatureDeprecated call. This requires a bunch of rework to: 1. Ensure that we have access to the subproject in the list of arguments when used as a decorator (see _get_callee_args). 2. Pass the subproject to .use() when it's called manually. 3. We also can't do feature checks for new features in meson_options.txt because that's parsed before we know the meson_version from project()
2018-07-02FeatureNew: Declare functions as class methods explicitlyNirbheek Chauhan1-6/+10
2018-07-02interpreter: Use is_subproject() everywhereNirbheek Chauhan1-3/+3
2018-07-02FeatureNew: Fix method names for some feature checksNirbheek Chauhan2-11/+12
2018-07-02FeatureNew: Minor code cleanup, no changesNirbheek Chauhan1-42/+41
Early return reduces indentation level and makes the code easier to read.
2018-07-02Remove permittedSnippetKwargs, snippets are not specialNirbheek Chauhan4-24/+17
All we needed to do was change _get_callee_args() to also support snippets.
2018-07-02Various bug fixes for FeatureNewSalamandar4-34/+70
* Use _get_callee_args to unwrap function call arguments, needed for module functions. * Move some FeatureNewKwargs from build.py to interpreter.py * Print a summary for featurenew only if conflicts were found. The summary now only prints conflicting features. * Report and store featurenew/featuredeprecated only once * Fix version comparison: use le/ge and resize arrays to not fail on '0.47.0>=0.47' Closes https://github.com/mesonbuild/meson/issues/3660
2018-07-01gnome: Use raw link arguments with g-ir and gtk-docNirbheek Chauhan4-19/+32
Those tools use our arguments to build a file and execute it to introspect it at runtime. However, they do not know that you can pass the full path to the library to use, and ignore the arguments. The long-term fix for this is to have them output a .c file that Meson will build for them, which they can then run, but that will require upstream changes: https://gitlab.gnome.org/GNOME/gtk-doc/merge_requests/1 Closes https://github.com/mesonbuild/meson/issues/3774
2018-07-01gnome: Distinguish between internal and external linker flagsTing-Wei Lan1-24/+37
When an older version of the library being built is installed in the same prefix as external dependencies, we have to be careful to construct the linker or compiler command line. If a -L flag from external dependencoes comes before a -L flag pointing to builddir, it is possible for the linker to load older libraries from the installation prefix instead of the newly built ones, which is likely to cause undefined reference error. Since the order of dependencies is not significant, we cannot expect internal dependencies to appear before external dependencies when recursively iterating the list of dependencies. To make it harder to make mistakes, linker flags come from internal and external dependencies are now stored in different order sets. Code using _get_dependencies_flags are expected to follow the order when constructing linker command line: 1. Internal linker flags 2. LDFLAGS set by users 3. External linker flags It is similar to what automake and libtool do for autotools projects.
2018-07-01Debug-log pkg-config callsChristopher Dunn1-2/+6
resolves #3607
2018-07-01Don't let build_always take precedence over build_by_default (#3816)Andrei Alexeyev1-1/+2
* Don't let build_always take precedence over build_by_default * Test for proper interaction of build_by_default with build_always Fixes #3815
2018-07-01Proper error message for non-found exe in run_target. Closes #3818Jussi Pakkanen1-0/+2
2018-07-01custom targets: Only add a dependency on absolute path external programsNirbheek Chauhan1-1/+5
If the external program is a string that is meant to be searched in PATH, we can't add a dependency on it at configure time because we don't know where it will be at compile time.
2018-07-01Add a helper for fetching of binaries from cross filesNirbheek Chauhan4-24/+38
A number of cases have to be taken care of while doing this, so refactor it into a helper on ExternalProgram and use it everywhere. 1. Command is a list of len > 1, use it as-is 2. Command is a list of len == 1 (or a string), use as a string 3. If command is an absolute path, use it as-is 4. If command is not an absolute path, search for it
2018-07-01Allow command lists for find_program cross file overridesNirbheek Chauhan1-2/+6
This is accepted by all other binaries in the cross file. With this change, we also don't check whether the specified command exists at configure time, but that's probably a feature anyway. Fixes https://github.com/mesonbuild/meson/issues/3737
2018-07-01Nirbheek/fix pkgconfig library dedup (#3813)Nirbheek Chauhan2-10/+21
* Add a test case for bad de-dup of -framework args https://github.com/mesonbuild/meson/issues/3800 * pkgconfig: Don't naively de-dup all arguments Honestly don't know what I was smoking. Of course the `Libs:` field in a pkg-config file can have arguments other than -l and -L Closes https://github.com/mesonbuild/meson/issues/3800 * pkgconfig module: Fix needlessly aggressive de-dup
2018-06-30Improve logging when dependency is anonymousJon Turney1-8/+10
Various pieces of logging assume the dependency has a name, and aren't grammatical if the dependency is '', so say it is anonymous instead.
2018-06-30More tests to cover missing fallback for a non-found dependencyJon Turney1-1/+3
Fix logic so we correctly raise an exception about missing fallback in the case where the dependency is required.
2018-06-30Fix handling of dependency('', fallback: ['subproject', 'dep'])Jon Turney1-8/+8
Also extend a test case to cover this.
2018-06-30fix find_library when cross-compiling 32-bit on 64-bit systemsBruce Richardson1-1/+11
When find_library is used to find dependencies, meson checks all paths for libraries with all prefixes that could match. This means that when we are compiling with -m32 on a 64-bit system, meson will find 64-bit libraries and assumes that they will work. Naturally that is not the case. The obvious fix is to do a test link against those libraries, but the extra wrinkle here is that we need to do a "whole link" so as to test the static libs. A check with gcc+ld on linux shows that unless there are unresolved symbols from the main.c file, the static library is never checked so we avoid the error from an incompatible library.
2018-06-30Warn if using Clang+asan+b_lundef. Closes #764.Jussi Pakkanen1-0/+19