Commit Graph

10410 Commits

Author SHA1 Message Date
Eli Schwartz ccd0cd3163 run_unittests: fix misc lint errors due to whitespace or unused imports/args 2021-02-05 16:33:23 -08:00
Eli Schwartz 67e99bb4ed run_unittests: fix undefined variable in error message
In commit fe973d9fc4, some uses of p got
rewritten to compiler.language, but not all. We'd still raise an error
message, but for the wrong thing. o_O
2021-02-05 16:33:23 -08:00
Eli Schwartz c3d516421f run_unittests: remove double definition of the same test case
In commit 591e6e94b9 we somehow ended up
with an identical extra copy.
2021-02-05 16:33:23 -08:00
Dylan Baker 0d0c6ede9b tests/cmake: disable some tests that don't work correctly when cross compiling 2021-02-05 16:31:33 -08:00
Dylan Baker d7cbde4118 unittests: fix error message string 2021-02-05 16:31:33 -08:00
Dylan Baker 456844a4f3 vala: Disable unity builds
Our approach to unity builds with vala is broken, you cannot unify the
generated C files, as they contain duplicate symbols. We would need to
instead combine the files while they are still in their vala form, then
convert that to C and compile the unified C file.

This does not fix the linked issue, as this removed the ability to do
vala unity builds, but it does allow running vala with `--unity=on`.

Related: #5280
2021-02-05 16:31:33 -08:00
Dylan Baker d2c7063c1a ninjabackend: add a few annotations 2021-02-05 16:31:33 -08:00
Dylan Baker 38025b9730 ci: fix yaml syntax error 2021-02-05 16:31:33 -08:00
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
Jeff Moguillansky 9226a92fe0 xcode-backend: add implicit includes
Move helper functions get_source_dir_include_args and
get_build_dir_include_args to backend base class
2021-02-04 13:05:17 -08:00
Jeff Moguillansky 7fd69cb4c4 xcode-backend: set global link args 2021-02-04 13:05:17 -08:00
Jeff Moguillansky 5d94d161ff xcode-backend: fix include paths
Add project directory as include path
Add include paths from dependencies for all languages (c, c++, objc, objc++)
2021-02-04 17:35:20 +00: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
Ali Alnubani a174855200 environment: fix typos
Fixed typos and reworded some sentences.

Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
2021-02-03 15:30:10 +00: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
Olexa Bilaniuk 325b01066a Quick update of table of CUDA Toolkit vs. NVIDIA driver versions. 2021-02-02 19:08:54 +00:00
Volker-Weissmann f31ffaaf17
bugfix concerning octal umasks (#8282)
* bugfix concerning octal umasks

* minor fix

* spelling mistake
2021-02-01 09:48:48 -08:00
Érico Rolim 127b788628 tests/common: fix " 37 has function" test on musl systems.
This commit fixes the test that asserts on whether the lchmod() function
should have been detected as available by Meson. It does so by assuming
that on Linux systems not using glibc, the function will be available.

- fix comment about lchmod on Linux: musl has implemented the function
correctly since 2013, so the assumption in the test wasn't correct.
Furthermore, musl doesn't use glibc's stub mechanism.
- fix include to receive __GLIBC__ definition: including almost any
header in glibc will end up defining __GLIBC__, since most headers
include <features.h>. The <gnu/libc-version.h> header was probably
chosen because of its name, but its actual purpose is defining functions
for checking glibc version at runtime (instead of what the binary was
built with), so it isn't necessary to use it. Since it is a completely
non standard header, including it makes the test suite fail on musl due
to not finding the header.
2021-02-01 07:09:37 -05: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
Xavier Claessens c491d48b9d minstall: Add --destdir command line option 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
Jeff Moguillansky 4f8cecca97 build: add function get_build_targets to Build class
Add function to Build class to get targets of type BuildTarget
Update xcode backend to call get_build_targets when iterating over targets.
This resolves crash in xcode backend when using custom targets:

AttributeError: ‘CustomTarget’ object has no attribute ‘objects’
2021-01-30 11:30:56 +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 0626465ea8 Fix executable as script on Windows
On Windows this would fail because of missing DLL:
```
mylib = library(...)
exe = executable(..., link_with: mylib)
meson.add_install_script(exe)
```

The reason is on Windows we cannot rely on rpath to find libraries from
build directory, they are searched in $PATH. We already have all that
mechanism in place for custom_target() using ExecutableSerialisation
class, so reuse it for install/dist/postconf scripts too.

This has bonus side effect to also use exe_wrapper for those scripts.

Fixes: #8187
2021-01-30 09:51:06 +00:00
Xavier Claessens ef7dfa97fc external_project: Add release snippet 2021-01-29 19:02:48 -05:00
Dylan Baker c321339b24 Change the Eoan CI to ubuntu rolling ci
This makes the Ubuntu CI always use the latest release, without us
having to manually change it.
2021-01-29 19:40:25 +00:00
Dylan Baker cbdef0479e workflows/os_comp: Don't run if there aren't relavent changes 2021-01-29 19:40:25 +00:00
Eli Schwartz 19d3a7f5b6
CI: arch: get hotdoc from official repos
It is now officially packaged.
2021-01-29 12:14:57 -05:00
Eli Schwartz 03b1955c68
CI: arch: remove duplicate package from list 2021-01-29 12:13:56 -05:00
Jussi Pakkanen 3f0a0c1582 Can read project version from a file. 2021-01-29 16:42:59 +00:00
Xavier Claessens fd572f32d8 Popen_safe: Fix stdout/stderr annotation 2021-01-29 11:06:16 -05:00
Xavier Claessens 11cfc258fc external_project: Add default configure options 2021-01-29 11:01:00 -05:00
Xavier Claessens 6a6323ff09 external_project: Do not set LD in the env
This was breaking some autotools projects such as libyaml.
2021-01-29 10:10:37 -05:00
Xavier Claessens 46b68d4c83 external_project: Improve logging
Write output of 'make' and 'make install' into log files as well when
not verbose.
2021-01-29 10:01:36 -05:00
Jeff Moguillansky 9eb8b6be28 xcode-backend: fix include paths
Add include paths from dependencies
2021-01-28 16:32:21 -08: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 e6ab364a69 dist: Use windows_proof_rmtree() instead of shutil.rmtree() 2021-01-26 21:32:03 -05:00
Xavier Claessens baa9eeebe4 dist: Allow packaging subproject in same git repo as main project 2021-01-26 21:32:03 -05:00
Eli Schwartz 9d602e6531
do not require git installed in order to use wraps
It doesn't make sense to check for the presence of git every time we use
it, but short-circuit any attempt to use a wrap right from the get-go
because we are trying to be fancy with submodules.

If git is not installed, simply do not try to figure out whether the
wrap is a submodule that can potentially be checked out/updated for the
user. Just take it on faith that it isn't one.

Fixes #2623
2021-01-26 08:09:53 -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