Commit Graph

5488 Commits

Author SHA1 Message Date
Goncalo Carvalho 5faf7f1a96 fix fallback variable name 2018-04-17 12:00:57 -07:00
Jussi Pakkanen 88ca3805e7
Merge pull request #1852 from QuLogic/openmp
Add an OpenMP dependency.
2018-04-17 21:39:13 +03:00
Niklas Claesson 348248f0a1 Exit meson with an error if an invalid escape sequence is found in a
string
2018-04-17 09:55:34 +00:00
Niklas Claesson b42dd7df0a Add release snippet 2018-04-17 09:55:34 +00:00
Tim 'mithro' Ansell 36aab0f4b2 Complete python escape sequences aware strings
Fixes #3169
2018-04-17 09:55:34 +00:00
Nirbheek Chauhan 6089631a1b Open build files with utf-8 2018-04-17 09:55:34 +00:00
Nirbheek Chauhan 695b8f3a03 cc.has_multi_arguments: Convert all -Wno args
Also add a test for it.
2018-04-17 09:55:18 +00:00
Bruce Richardson 162a58b493 fix checks for gcc disable warning flags
GCC does not print a warning or error for unknown options if the options
are to disable warnings. Therefore, when checking for options starting
'-Wno-', also check the opposite enabling option.  This fixes the case
where e.g.  -Wno-implicit-fallthrough is incorrectly reported as supported
by gcc 5.4. To avoid missed warnings when using combinations of flags, such
as in test case "112 has arg", we limit the checking of for the positive
option to where the negative option is checked alone.
2018-04-17 09:55:18 +00:00
Elliott Sales de Andrade 46ccbe48e7 Add release note for OpenMP dependency. 2018-04-17 02:04:39 -04:00
Elliott Sales de Andrade 2c8ff7c027 Skip OpenMP tests on old compilers. 2018-04-17 02:04:39 -04:00
Elliott Sales de Andrade 461f3af294 Explicitly check for OpenMP headers. 2018-04-17 02:04:39 -04:00
Elliott Sales de Andrade 9c254cca65 Determine OpenMP version from _OPENMP macro. 2018-04-17 02:04:38 -04:00
Elliott Sales de Andrade dbb025a175 Add an OpenMP dependency.
This works similarly to the thread dependency which stores the various
inconsistent flags in each compiler.
2018-04-17 02:04:37 -04:00
Jussi Pakkanen f7a7059250
Merge pull request #3246 from sarum9in/non-unique-target-names
Allow same target names in different subdirectories
2018-04-17 01:23:44 +03:00
Aleksey Filippov a64d16c6bb Add build snippet for non-unique-target-names feature 2018-04-16 23:18:26 +01:00
Aleksey Filippov 49d7d3f8e5 Add 'failing/17 same target' test 2018-04-16 22:51:34 +01:00
Aleksey Filippov f4ea6ac454 Add '189 same target name flat layout' test 2018-04-16 22:51:34 +01:00
Aleksey Filippov cb761718f0 Generate target id based on subdirectory instead of subproject
Allows creation of targets with same name in different subdirectories.
Closes #2861 and closes #1867
2018-04-16 22:51:34 +01:00
Jussi Pakkanen c58dd64f8e Merged Arm CC support. 2018-04-16 23:02:09 +03:00
Tom Schoonjans fa6ca16054 Add macOS linker versioning information
This patch exploits the information residing in ltversion to set the
-compatibility_version and -current_version flags that are passed to the
linker on macOS.
2018-04-16 22:26:16 +03:00
Jussi Pakkanen 0e00470d8c
Merge pull request #3218 from mesonbuild/findoverrider
Make it possible to override find_program [skip ci]
2018-04-16 22:22:02 +03:00
Marvin Scholz 5e45f4c621 Do not use -soname when linking with GCC for mingw/cygwin
GNU LD does not use soname when linking a PE/COFF binary, so it makes no
difference, but it breaks when using the llvm linker (lld), which does
not support the soname flag when building PE/COFF binaries for Windows.

Fix #3179
2018-04-16 03:10:11 +00:00
Marvin Scholz eadaf92794 Docs: Mention important macOS caveat about function detection [ci skip] 2018-04-16 02:36:53 +00:00
Nirbheek Chauhan ef81a013a5 cross: Add compiler cross_args after normal args
This way they override all other arguments. This matches the order of
link arguments too.

Note that this means -I flags will come in afterwards and not override
anything else, but this is correct since that's how toolchain paths
work normally too -- they are searched last.

Closes https://github.com/mesonbuild/meson/issues/3089
2018-04-15 22:29:49 +03:00
Jussi Pakkanen 86f725c1e5
Merge pull request #3115 from makise-homura/e2k-lcc-support
Support lcc compiler for e2k (Elbrus) architecture
2018-04-15 17:18:44 +03:00
Nirbheek Chauhan 6cdd14fc4e find_program: Don't spam when called from a module
The user doesn't need to know whether or not the program was found,
especially not when it's spammed for every gnome.foo() function
2018-04-15 14:13:35 +05:30
Nirbheek Chauhan 0e6a332d0c Document that override_find_program works on configure_file [skip ci]
Also link to the release notes snippet from the Reference manual
2018-04-15 13:32:38 +05:30
Jussi Pakkanen f489aa77e5 Added documentation [skip ci] 2018-04-15 13:32:38 +05:30
Jussi Pakkanen 648e1303c4 Renamed test dirs to avoid duplicate numbers [skip ci] 2018-04-15 13:32:38 +05:30
Nirbheek Chauhan 87c166db95 find_program: Only store successful lookups
Otherwise we can't do the following workflow:

if not find_program('foo', required : false).found()
  subproject('provides-foo')
endif

Where 'provides-foo' has a meson.override_find_program() on
a configure_file() or similar.
2018-04-15 13:32:38 +05:30
Jussi Pakkanen 998892ed29 Updated all modules to work with the new API. 2018-04-15 13:32:38 +05:30
Jussi Pakkanen 4256c0dae2 Can override programs with scripts generated with configure_file. 2018-04-15 13:32:38 +05:30
Jussi Pakkanen bdb57cf62a Convert Gnome module to use find_program from interpreter. 2018-04-15 13:32:38 +05:30
Jussi Pakkanen de65adb8b1 Made it possible to override find_program to return a different program.
Closes https://github.com/mesonbuild/meson/issues/2005
2018-04-15 13:32:38 +05:30
Martin Hostettler aff597fb99 ninjabackend: Try to guess library dependencies for linker invocation.
The linkers currently do not support ninja compatible output of
dependencies used while linking. Try to guess which files will be used
while linking in python code and generate conservative dependencies to
ensure changes in linked libraries are detected.

This generates dependencies on the best match for static and shared
linking, but this should not be a problem, except for spurious
rebuilding when only one of them changes, which should not be a problem.

Also makes sure to ignore any libraries generated inside the build, to
keep the optimisation working where changes in a shared library only
cause relink if the symbols have changed as well.
2018-04-15 07:29:21 +00:00
Martin Hostettler 642e17aa6b compilers: is_library: Also detect .so files with version (using soregex) 2018-04-15 07:29:21 +00:00
Martin Hostettler 3f7c6cf3d6 Improve generation of pkg-config files for static only libraries.
Previously pkg-config files generated by the pkgconfig modules for static libraries
with dependencies could only be used in a dependencies with `static: true`.

This was caused by the dependencies only appearing in Libs.private even
if they are needed in the default linking mode. But a user of a
dependency should not have to know if the default linking mode is static
or dynamic; A dependency('somelib') call should always pull in all
needed pieces into the build.

Now for meson build static libraries passed via `libraries` to the generate
method automatically promote dependencies to public.
2018-04-14 23:43:29 +03:00
Jussi Pakkanen 7c37ca15f3 🤦🤦🤦 2018-04-14 22:41:24 +03:00
Jussi Pakkanen 2a70327f1d
Merge pull request #2930 from inigomartinez/gdbus-targets
gnome: Split header and code targets in gdbus_codegen()
2018-04-14 22:35:01 +03:00
Alberto Sartori 717f7db67e improve suite of meson test (#3369) 2018-04-14 22:17:02 +03:00
Nirbheek Chauhan 2e5b2813d5 compilers: Cache compiler checks where we don't want the output
This caching is only for a single run, so it doesn't help reconfigure.
However, it is useful for subproject setups where different subprojects
will run the same compiler checks.

The cache is also per compiler instance and is not used for functions
that want to read or run the outputted object file or binary.

For gst-build, this halves the number of compiler checks that are run
and reduces configuration time by 20%.
2018-04-14 22:14:11 +03:00
Jussi Pakkanen 798d841348
Merge pull request #3396 from mesonbuild/nirbheek/cache-pkgconfig
PkgConfigDependency: Cache the output of pkg-config
2018-04-14 22:05:37 +03:00
textshell 0535f38af9 pkgconfig module: Fix regression that Requires.private is generated as 'Q, t, 5, C, o, r, e' instead of Qt5Core. (#3406) 2018-04-14 21:57:12 +03:00
Robin c2f062a02e Fix encoding bug on Windows 2018-04-14 21:56:24 +03:00
Jon Turney cb597adb01 Indicate subproject depth in console output 2018-04-13 01:05:54 +00:00
Daniel Schulte 57654bf367 Deduplicate dependencies resolved to absolute paths
If paths are absolute the order of search directories is not relevant as the path is already resolved.
2018-04-13 01:05:25 +00:00
Bruce Richardson 7806175c21 don't create unneeded internal dependency objects
when flattening the chained dependencies of an object, we don't need to
create any new internal dependencies if all the fields to be added to it
are empty.

For projects with a lot of libraries and dependency objects this can lead
to noticeable performance improvements.

fixup
2018-04-13 01:04:38 +00:00
Bruce Richardson c213d715eb Prune unneeded transitive dependencies
When getting dependencies, we don't need to get the same dependencies and
dependency chains multiple times. If library a depends on x, y and z, and
library b depends on a, then we should not have to iterate through x, y and
z multiple times. Pruning at the stage of scanning the dependencies leads
to significant time savings when running meson
2018-04-13 01:03:59 +00:00
Nirbheek Chauhan 3acda1d998 PkgConfigDependency: dicts aren't hashable, so use frozenset 2018-04-13 04:48:03 +05:30
Nirbheek Chauhan eb07ad867e PkgConfigDependency: Cache the output of pkg-config
This halves the configure time in gst-build, the aggregate of all
GStreamer repositories.

We can't do this to Popen_safe because we can't be sure that other
programs have no side-effects and will always return the same output
for the same arguments and environment.
2018-04-13 03:17:42 +05:30