Commit Graph

1497 Commits

Author SHA1 Message Date
Xavier Claessens b5100fe86a gnome: Add post_install() method
Various GNOME projects have scripts that does similar task, better do it
directly in meson. This ensures it's done correctly regarding usage of
subprojects and pkg-config. See for example this gtk bug:
https://gitlab.gnome.org/GNOME/gtk/-/issues/3626.

Fixes: #8268
2021-02-05 15:08:47 -05:00
Luke Drummond 46e3480f7c Introduce `fs.read` to read a file as a string
Following #7890, this patch introduces the ability to read the contents
of a file to the fs module.

This patch introduces the ability to read files at configure time, but
has some restrictions:
    - binary files are not supported (I don't think this will prove a
    problem, and if people are wanting to do something with binary
    files, they should probably be shelling out to their own script).
    - Only files outside the build directory allowed. This limitation
      should prevent build loops.
Given that reading an arbitrary file at configure time can affect the
configuration in almost arbitrary ways, meson should force a reconfigure
when the given file changes. This is non-configurable, but this can
easily be changed with a future keyword argument.
2021-02-04 17:34:11 +00:00
Xavier Claessens 95c0790711 minstall: Add --dry-run option
Closes: #1281
2021-02-04 16:24:38 +00:00
Luca Weiss 673aff3595 Fix some typos in the release notes snippets 2021-02-03 11:15:14 -08:00
Jussi Pakkanen cd94cf8995
Merge pull request #8087 from dcbaker/submit/lto-extensions
Add option for thinLTO
2021-02-02 22:17:13 +00:00
Eli Schwartz 65b3d67c7e
doc: fix typos 2021-02-02 16:15:48 -05:00
Dylan Baker 6f532b72c8 Add support for LLVM's thinLTO
This uses a separate option, b_lto_mode. It works in conjunction with
b_lto_threads.

Fixes #7493
2021-02-02 12:42:48 -08:00
Dylan Baker bffc94b08f compilers: Add support for using multiple threads with lto
Both Clang and GCC support using multiple threads for preforming link
time optimizaions, and they can now be configured using the
`-Db_lto_threads` option.

Fixes #7820
2021-02-02 12:42:48 -08:00
Jussi Pakkanen 474f4813c4 Capitalize "Meson" consistently as it is a proper name. [skip ci] 2021-01-31 19:49:20 +00:00
Paolo Bonzini 4bde7f31ae copy editing for 0.57 release notes [skip ci] 2021-01-31 15:11:30 +00:00
Xavier Claessens 6c6b5d77d6 add_install_script: add skip_if_destdir kwarg
It is common, at least in GNOME projects, to have scripts that must be
run only in the final destination, to update system icon cache, etc.
Skipping them from Meson ensures we can properly log that they have not
been run instead of relying on such scripts to to it (they don't
always).
2021-01-30 21:28:21 +00:00
Jussi Pakkanen f72ee8e742 Rewrap long text lines in docs. [skip ci] 2021-01-30 16:19:59 +00:00
Jussi Pakkanen c67e0a8a67
Merge pull request #8264 from xclaesse/ep-misc
external_project: misc improvements
2021-01-30 11:30:16 +00:00
Jussi Pakkanen f0fbb31ccf
Merge pull request #8200 from bonzini/mtest-asyncio-logs
mtest: improvements to logging
2021-01-30 09:52:43 +00:00
Xavier Claessens ef7dfa97fc external_project: Add release snippet 2021-01-29 19:02:48 -05:00
Jussi Pakkanen 3f0a0c1582 Can read project version from a file. 2021-01-29 16:42:59 +00:00
Xavier Claessens 11cfc258fc external_project: Add default configure options 2021-01-29 11:01:00 -05:00
Dylan Baker f808c955ea intepreter: Allow using file objects for the script_name of add_*_script
It's a bit silly and conveluted to have to call find_program on the
output of configure_file, so let's just allow passing files as the
script name.
2021-01-27 21:59:55 +00:00
Xavier Claessens 633264984b custom_target: Add env kwarg 2021-01-27 09:00:54 -05:00
Xavier Claessens e4137ae3ec test: Make timeout <= 0 infinite duraction 2021-01-27 08:26:20 -05:00
Xavier Claessens baa9eeebe4 dist: Allow packaging subproject in same git repo as main project 2021-01-26 21:32:03 -05:00
Florian Schmaus 0f5a136c40
docs: Fix sentence in Machine-files.md [skip ci]
Fixes: 1ca17dc853 ("docs/machine-files: Add a section on data types")
2021-01-26 08:09:53 -05:00
Evgeny Ermakov a24546d7da docs: Fix typo in Syntax.md [skip ci] 2021-01-23 17:25:51 +00:00
Paolo Bonzini ec02753fbf docs: add documentation snippet for meson test console output changes 2021-01-22 12:18:59 +01:00
Paolo Bonzini adb1b2f3f6 interpreter: accept external programs and dependencies for summary 2021-01-21 08:54:35 -05:00
Marios Staikopoulos f8681b12e1 MSVC and Clang-Cl Compiler Argument Cleanup
This commit performs some cleanup for the msvc and clang-cl arguments.

* "Disable Debug" (`/Od`) is no longer manually specified for optimization levels {`0`,`g`} (it is already the default for MSVC).
* "Run Time Checking" (`/RTC1`) removed from `debug` buildtype by default
* Clang-CL `debug` buildtype arguments now match MSVC arguments
* There is now no difference between `buildtype` flags and `debug` + `optimization` flags
2021-01-20 14:11:16 -05:00
Volker Weißmann 2e48d13fa2 Added "How do I use a library before declaring it?" in the FAQ. 2021-01-20 19:07:04 +00:00
Jussi Pakkanen 8133a7b9a4 Keep buildtype the same even if user changes debug and/or optimization. 2021-01-19 20:25:55 +00:00
Marios Staikopoulos a3d8dc546c Removal of /ZI on MSVC Debug
The /ZI flag adds in "Edit and Continue" debug information, which will
cause massive slowdown. It is not a flag that we should be adding by
default to debug builds.

/Zi will still be added.
2021-01-17 21:03:35 +00:00
Paolo Bonzini ea2f34e286 mtest: allow quickly interrupting the test run
The new behavior of interrupting the longest running test with Ctrl-C is useful
when tests hang, but not when the run is completely broken for some reason.
Psychology tells us that the user will compulsively spam Ctrl-C in this case,
so exit if three Ctrl-C's are detected within a second.
2021-01-14 22:00:51 +00:00
gaal-dev e3bd45c7c3
Add qtcreator to IDE-integration.md 2021-01-14 08:40:07 -05:00
Antonin Décimo 39ede12aa5 Fix misspells
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
2021-01-13 12:53:10 -05:00
Eli Schwartz adfcf77109
summary: align left, not align middle
aligning along the left is, I think, what most projects want to do.
Aligning along the middle looks subjectively ugly, and objectively
prevents me from further indenting an element, e.g.

  Build information:
    prefix                : /usr
    sysconfdir            : /etc
        conf file         : /etc/myprogram.conf
2021-01-12 19:19:00 -05:00
Luke Elliott 9efcdba0d5 Allow '//' as project function id due to git bash path conversion.
See https://stackoverflow.com/questions/54258996/git-bash-string-parameter-with-at-start-is-being-expanded-to-a-file-path
2021-01-12 17:42:57 +00:00
Eli Schwartz a0d54d0441
doc: fix invalid Commands.md example for introspect [skip ci]
It requires at least one option argument, and the one that provides
"basic information" about the project is --projectinfo, so let's use
that to demo the command.

Fixes #8182
2021-01-11 14:12:29 -05:00
Michael Brockus 72365e6856
Add Chicken-Libraries to Users.md (#8180) 2021-01-11 10:33:59 -05:00
Daniel Mensinger 8f1d9bb7b0 cmake: add PATH logic to preliminary dep check (fixes #8133) 2021-01-10 21:48:23 +00:00
Eli Schwartz c18a9715b8
Hotdoc: use template for Commands.md instead of generating the entire file (#8154)
* doc: fix hotdoc misuse for dynamically generated content

hotdoc has a native include feature for including files inline. Use this
to generate one file for each dynamically generated code block, and
include that file in Commands.md; see:
https://hotdoc.github.io/syntax-extensions.html#smart-file-inclusion-syntax

This permits us to move back to using the in-tree version of the hotdoc
*.md sources, thus fixing the incorrect inclusion of "builddir/" in the
"Edit on github" links which resulted from using copies as the source.

Fixes #8061

* doc: call the dummy file a "stamp" as it is a better known term
2021-01-10 14:48:34 +02:00
Jussi Pakkanen c9d9dacdbc
Merge pull request #7860 from dcbaker/wip/2020-10/rust-module
Add a rust module
2021-01-06 00:05:48 +00:00
Dylan Baker 3d80a88bd3 modules: Add an unstable-rust module
Like other language specific modules this module is module for holding
rust specific helpers. This commit adds a test() function, which
simplifies using rust's internal unittest mechanism.

Rust tests are generally placed in the same code files as they are
testing, in contrast to languages like C/C++ and python which generally
place the tests in separate translation units. For meson this is
somewhat problematic from a repetition point of view, as the only
changes are generally adding --test, and possibly some dependencies.

The rustmod.test() method provides a mechanism to remove the repatition:
it takes a rust target, copies it, and then addes the `--test` option,
then creates a Test() target with the `rust` protocol. You can pass
additional dependencies via the `dependencies` keyword. This all makes
for a nice, DRY, test definition.
2021-01-05 15:10:50 -08:00
Jussi Pakkanen f9dd75f213 Fix last mention of Python 3.5. [skip ci] 2021-01-05 11:48:58 -08:00
Dylan Baker d89ec98b47 mtest: Add support for rust unit tests
Rust has it's own built in unit test format, which is invoked by
compiling a rust executable with the `--test` flag to rustc. The tests
are then run by simply invoking that binary. They output a custom test
format, which this patch adds parsing support for. This means that we
can report each subtest in the junit we generate correctly, which should
be helpful for orchestration systems like gitlab and jenkins which can
parse junit XML.
2021-01-05 10:23:41 -08:00
Eli Schwartz 67ee65f47e
doc: restore accidentally removed images used in Getting-meson.md [skip ci]
Broken in commit 8a11cf357e

Fixes #8148
2021-01-03 20:41:35 -05:00
Jussi Pakkanen 8a11cf357e Add simple start page for beginners. [skip ci] 2020-12-22 18:08:47 +00:00
Eli Schwartz 55a3458d7b
Revert "add owl chess in Users.md [skip ci]"
This reverts commit 7092efabb5.

No longer exists. See:
https://github.com/mesonbuild/meson/pull/7592#issuecomment-747817950
2020-12-17 21:06:34 -05:00
Jussi Pakkanen d32d0d6b53
Merge pull request #7902 from bonzini/mtest-build-depends-only
mtest: only build what is needed for the tests
2020-12-15 21:21:50 +00:00
Jean-Michel Gorius 521a1b9921 docs: Update link to libspng [skip ci]
libspng moved from Gitlab to Github. Update the link to point to the new location.
2020-12-15 17:49:05 +00:00
Eli Schwartz 9a42779521
doc: fix typos for doubled words [skip ci]
"more more" is one place where we don't need more.

Fixes #8097
2020-12-14 21:24:34 -05:00
Paolo Bonzini 79e2c52a15 mtest: only build what is needed for the tests
It is a usual workflow to fix something and retest to see if it is fixed using a
particular test.  When tests start to become numerous, it becomes time consuming
for "meson test" to relink all of them (and in fact rebuild the whole project)
where the user has already specified the tests they want to run, as well as
the tests' dependencies.

Teach meson to be smart and only build what is needed for the test (or suite)
that were specified.

Fixes: #7473
Related: #7830
2020-12-14 10:53:36 +01:00
Christoph Reiter 8d04b3ce74 CI: Move all remaining jobs from travis-ci to GHA
Some changes:

* Set HOME to /root, since github mounts its own HOME and 'wine'
  (because of permissions) and 'dub' (can't find packages) don't
  like that.
* Remove the seccomp option, doesn't seem to be needed.
2020-12-11 13:45:11 -08:00