Commit Graph

357 Commits

Author SHA1 Message Date
Xavier Claessens 39a69d1fb0 find_program: Fixes when the program has been overridden by executable
- ExternalProgramHolder has path() method while CustomTargetHolder and
  BuildTargetHolder have full_path().
- The returned ExternalProgramHolder's path() method was broken, because
  build.Executable object has no get_path() method, it needs the
  backend.
- find_program('overridden_prog', version : '>=1.0') was broken because
  it needs to execute the exe that is not yet built. Now assume the
  program has the (sub)project version.
- If the version check fails, interpreter uses
  ExternalProgramHolder.get_name() for the error message but
  build.Executable does not implement get_name() method.
2020-04-28 01:39:56 +03:00
Dylan Baker 7b7f93a09f mtest: Generate a JUnit xml result file
JUnit is pretty ubiquitous, lots of services and results viewers
understand it, in particular gitlab and jenkins know how to consume
JUnit xml. This means projects using CI services can have their test
results consumed automatically.

Fixes: #6972
2020-04-23 13:26:01 -07:00
Xavier Claessens a6239d5100 wrap: Add fallback urls
It can happen that a server is temporaly down, tarballs often have
many mirrors available so we should be able to add at least one fallback
mirror in wrap files.
2020-04-13 13:29:33 +03:00
Xavier Claessens 8603c3b445 dist: Add --no-tests option
It is not always needed to test generated tarballs, for example when
they are generated by CI that already does its own testing.
2020-03-29 21:12:34 +03:00
Jussi Pakkanen 15b0bd6e93 Update everything for new release. 2020-03-29 20:37:15 +03:00
Xavier Claessens 4d7ccd1399 Make werror per subproject option 2020-03-24 22:48:55 +02:00
Jussi Pakkanen 7924e5f9c2 Revert "Naturally use env vars a bit more to match Autoconf"
This reverts commit 097dfc085e.
2020-03-23 18:07:24 +02:00
John Ericson 097dfc085e Naturally use env vars a bit more to match Autoconf
PR #6363 made it so our interpretation of env vars no longer clashed
with Autoconf's: if both Meson and Autoconf would read and env var, both
would do the same things with the value they read.

However, there were still cases that autoconf would read an env var when
meson wouldn't:

 - Autoconf would use `CC` in cross builds too

 - Autoconf would use `CC_FOR_BUILD` in native builds too.

There's no reason Meson can't also do this--if native cross files
overwrite rather than replace env vars, cross files can also overwrite
rather than replace env vars.

Because variables like `CC` are so ubiquitous, and because ignoring them
in cross builds just makes those builds liable to break (and things more
complicated in general), we bring Meson's behavior in line with
Autoconf's.
2020-03-23 17:51:36 +02:00
John Ericson 3a4388e51d Fix legacy env var support with cross
Fix #3969
2020-03-23 17:51:36 +02:00
Jussi Pakkanen 9e5c881b06 Add property to disable compiler sanity checks during cross compilation. 2020-03-22 23:07:53 +02:00
alanNz 7460292810 -Add xc16 and c2000 C,Cpp toolchain support 2020-03-21 00:47:24 +02:00
Camilo Celis Guzman 18373cba74 mtest: terminate a test via SIGTERM first then (if needed) via SIGKILL 2020-03-19 23:04:36 +02:00
Daniel Mensinger 673ca982f1 cmake: Add find_package COMPONETS support 2020-03-19 22:52:03 +02:00
Dylan Baker 9074c7f8a4 envconfig: Make compiler and linker environment variables match 2020-03-17 10:40:39 -07:00
Dylan Baker 20f8e47221 docs: Update documentation for GDC linker overriding 2020-03-12 13:21:04 -07:00
Dylan Baker b54e557a40 docs: Document that ldc now supports linker overriding [skip ci] 2020-03-12 21:19:47 +02:00
Jussi Pakkanen 5c51d4521a
Merge pull request #6532 from jon-turney/languages-native-kwarg
Add add_languages(native:)
2020-03-09 01:20:57 +02:00
Jussi Pakkanen 7234316dc7
Merge pull request #6688 from dcbaker/emcc-linker-bugs
Emcc linker bugs and improvments
2020-03-08 14:04:48 +02:00
Xavier Claessens ecb076ba00 qt5: Add has_tools() method 2020-03-08 13:48:27 +02:00
Xavier Claessens 943e9368f7 Simplify dependency() fallback
Now that subprojects can override the dependency name, there is no need
to provide a variable name for the fallback any more.
2020-03-06 15:26:02 -05:00
Xavier Claessens 2fdedc4d0f Add meson.override_dependency()
Similar to meson.override_find_program() but overrides the result of the
dependency() function.

Also ensure that dependency() always returns the same result when
looking for the same dependency, this fixes cases where parts of the
project could be using a system library and other parts use the library
provided by a subproject.
2020-03-06 15:25:46 -05:00
Dylan Baker 1210a67f66 mesonbuild: Add mcompile command
This is tested working with both msbuild and ninja/samu. Since our xcode
support is pretty much broken I didn't bother.

Fixes #6670
2020-03-04 14:07:27 -05:00
Stéphane Cerveau a46f0a6202 interpreter: add 'name' method to BuildTargetHolder
As any child of BuildTargetHolder might need the name of the object,
provides a method to get object name.
This is useful in gst-build to display the plugin name and not
the filename.
2020-03-04 13:49:01 -05:00
Michael 2f080b1f2e add -C to meson init 2020-03-02 13:50:58 -05:00
Jussi Pakkanen 200738a3e6
Merge pull request #6692 from xclaesse/summary-warnings
Summary improvements
2020-03-01 19:30:10 +02:00
Jon Turney 96f661e150
Add release note snippet 2020-02-28 11:54:09 +00:00
Dylan Baker 654f427759 compilers/linkers: Add a representation for wasm-ld
Emscripten does have a stand alone linker, wasm-ld. This patch adds the
linker, adds detection for the linker, and removes the IsLinkerMixin for
emscripten. This is a little more correct, and makes the code a lot
cleaner and more robust.
2020-02-27 16:35:02 -08:00
Dylan Baker 771b0d3ffb compilers/mixins/emscripten: Implement thread support
Emscripten has pthread support (as well as C++ threads), but we don't
currently implement them. This fixes that by adding the necessary code.
The one thing I'm not sure about is setting the pool size. The docs
suggest that you really want to do this to ensure that your code works
correctly, but the number should really be configurable, not sure how to
set that.

Fixes #6684
2020-02-27 16:35:02 -08:00
Xavier Claessens 8101b0ddab summary: Add more info in Subprojects section
This adds a warnings counter for subprojects that passed. This is to
encourage developpers to check warnings in the logs and hopefully fix
them. Otherwise they could be hidden in hundreds lines of logs.

This also print the error message for subprojects that did not pass. The
error message is often enough to fix the issue (e.g. missing
dependency) and it's easier than searching in the logs why a subproject
failed.
2020-02-26 14:24:12 -05:00
Xavier Claessens c175e97a88 summary: Add list_sep keyword argument
This allows having lists on a single line instead of having each value
aligned on a new line.
2020-02-26 14:24:12 -05:00
Jussi Pakkanen fb2b637bbb Typo fix. [skip ci] 2020-02-25 20:39:45 +02:00
Jussi Pakkanen 999376a347 Document the project policy on mixing build systems. [skip ci] 2020-02-25 20:28:28 +02:00
Jussi Pakkanen 9c604320a0
Merge pull request #6637 from mesonbuild/nirbheek/implement-symbolextractor-windows
Implement symbolextractor on windows + some cleanups/fixes
2020-02-23 20:23:03 +02:00
Nirbheek Chauhan be486a2ec8 ninjabackend: List PDBs in output list for targets
This is more correct, and forces the target(s) to be rebuilt if the
PDB files are missing. Increases the minimum required Ninja to 1.7,
which is available in Ubuntu 16.04 under backports.

We can't do the same for import libraries, because it is impossible
for us to know at configure time whether or not an import library will
be generated for a given DLL.
2020-02-22 06:49:34 +05:30
Rohan Garg 73f03e6093 Introduce dataonly for the pkgconfig module
This allows users to disable writing out the inbuilt variables to
the pkg-config file as they might actualy not be required.

One reason to have this is for architecture-independent pkg-config
files in projects which also have architecture-dependent outputs.

For example : https://gitlab.freedesktop.org/wayland/weston/issues/269

Fixes #4011
2020-02-20 10:19:19 -05:00
Nirbheek Chauhan 53265e3bc2 minstall: Add a new option --quiet
This is a significant speed-up on Windows because terminals are
slow to print things out.

Speed-up in gst-build on Windows:

```
meson install:
before: 5.1 seconds
after:  4.0 seconds
```
2020-02-17 23:58:20 +05:30
Jussi Pakkanen 47759550e5 Add unity block size option. 2020-02-12 22:31:08 +02:00
Jon Turney c5a32c2afe
Refine behaviour of add_languages() when native: is missing
This improves the common case of a simple meson.build which doesn't
contain any 'native: true' targets to not require a native compiler when
cross-compiling, without needing any changes in the meson.build.

v2:
Do it the right way around!
2020-02-12 13:33:00 +00:00
Jon Turney 7a159ff1e1
Add add_languages(native:)
v2:
Retain not using logical-and, to avoid short-circuiting side-effects
of add_languages()
2020-02-09 16:01:34 +00:00
Jussi Pakkanen 31d89a4ed2
Merge pull request #6421 from dcbaker/zlib-system-dep
Add a "system" dependency for zlib
2020-02-07 21:15:55 +02:00
Xavier Claessens 3ba0073df6 Make 'default_library' per-subproject builtin option
Currently it's just like if all builtin/base/compiler options are
yielding. This patch makes possible to have non-yielding builtin
options. The value in is overriden in this order:
 - Value from parent project
 - Value from subproject's default_options if set
 - Value from subproject() default_options if set
 - Value from command line if set
2020-02-06 14:11:24 -05:00
Michael Hirsch, Ph.D a4e4d2e75a
doc 2020-02-05 13:26:35 -05:00
Michael Hirsch, Ph.D 554d35c3f3
add get_external_property to replace get_cross_property 2020-02-05 13:23:55 -05:00
Michael Hirsch, Ph.D c2e6565029
add meson.get_native_property for native files
This allows Meson native-file [properties] to be used.
This avoids the need to call meson from a script file or have a
long command line invocation of `meson setup`

The method meson.get_native_property('prop', 'fallback') is added.
The native file can contain properties like

```
[properties]
myprop1 = 'foo'
mydir2 = 'lib/custom'
```

Then from within `meson.build`

```meson
x1 = meson.get_native_property('myprop1')

thedir = meson.get_native_property('mydir2', 'libs')
```

fallback values are optional
2020-02-05 13:23:55 -05:00
Jussi Pakkanen dc8d241583
Merge pull request #6573 from michaelbadcrumble/add_sample_templates
Add new Meson sample templates
2020-02-05 19:45:59 +02:00
Xavier Claessens 4c5a9523be pkgconfig: Generate -uninstalled.pc files
Closes: #3472.
2020-02-05 16:54:01 +01:00
Michael ec12b39658 add feature note 2020-02-02 17:18:57 -08:00
Dylan Baker e728331cc8 docs: Add snippet for zlib system dependency 2020-01-31 09:28:56 -08:00
Jussi Pakkanen 0fe485a100 Tell contributors not to write things in the snippet help file. [skip ci] 2020-01-27 23:11:44 +02:00
Jussi Pakkanen 8cb2cbaed2 Only provide 64 bit MSIs going forward. [skip ci] 2020-01-27 22:21:31 +02:00