aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-05-06Limit parallelism to hopefully work on machines with 160 cores.limitparJussi Pakkanen1-1/+6
2022-05-06compiler.has_argument: Add `-Werror=unknown-warning-option` to clang-cl cmd lineKhairul Azhar Kasmiran1-1/+1
2022-05-06devenv: Set WINEPATH when cross compiling for WindowsXavier Claessens4-6/+74
2022-05-06coverage: be clever and detect config files for gcovr/lcovEli Schwartz2-13/+40
gcovr will read this file anyway, but if it exists we don't need to assume that the project wishes to exclude subprojects/ -- they can determine that themselves. Fixes #3287 Closes #9761 lcov doesn't read the config file by default, but we can do the smart thing here. Fixes #4628
2022-05-06Add some scaffolding needed for C++ modules in GCC.Jussi Pakkanen14-0/+98
Further work pending GCC bug #105467 and/or Ninja bug #1962.
2022-05-06Move Visual Studio module test to its own subdir.Jussi Pakkanen13-14/+21
2022-05-06unittests: Skip prelinking test with gcc 8 or olderSimon McVittie1-4/+2
This was already skipped when running on the Ubuntu 18.04 version of gcc, but it also fails with gcc 8.3.0 on Debian 10. Instead of hard-coding specific versions to look for, do a version comparison. Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-05minit: refuse to allow creating broken projectsEli Schwartz1-0/+4
Some executable names are invalid, and while it's unlikely anyone will specify such a thing using the --executable argument, it's not unlikely that people experimenting will attempt to use meson init in a directory named "test". This then defaults to that for both the project name and the sample target name, and the latter produces errors when you try to build it. Fixes #10321
2022-05-03add prefer_static built-in optionDudemanguy10-7/+28
By default, meson will try to look for shared libraries first before static ones. In the meson.build itself, one can use the static keyword to control if a static library will be tried first but there's no simple way for an end user performing a build to switch back and forth at will. Let's cover this usecase by adding an option that allows a user to specify if they want dependency lookups to try static or shared libraries first. The writer of the meson.build can manually specify the static keyword where appropriate which will override the value of this option.
2022-05-03dependencies: cleanup kwargs.get('static') usageDudemanguy2-3/+2
In a couple of spots, kwargs.get('static', False) was being unneccesarily used. In these spots, we can just use self.static instead which is already inherited from the ExternalDependency. In additional, the python system dependency oddly has a kwargs.get('static', False) line which overrides the self.static in that dependency for no real reason. Delete this line too.
2022-05-03dependencies: handle one more case of subproject installed filesEli Schwartz5-1/+11
Some projects treat meson.project_source_root() as the root of the dependency files, because the project itself merely wraps a bunch of datafiles. Our validation to make sure this doesn't point to another subproject, made use of pathlib.Path's generator for all component paths, which... did not include the path itself. So go ahead and explicitly check that too. Add a test case to verify it while we are at it. Fixes https://github.com/mesonbuild/meson/pull/10103#issuecomment-1114901033
2022-05-04devenv: Use PkgConfigDependency.get_env()Xavier Claessens2-5/+3
This ensures that PKG_CONFIG_PATH, PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR are also set properly.
2022-05-03add testcase for bad things with add_project_dependenciesPaolo Bonzini10-0/+53
Test that add_project_dependencies() can only be used before build targets have been declared. Also test that one cannot use override_dependency on a superproject to inject a superproject's build products into the subproject. This would violate the rule that build products cannot be used with add_project_dependencies() (similar to e.g. compiler.has_function), so check that meson detects the situation correctly.
2022-05-03interpreter: new function add_project_dependencies()Paolo Bonzini10-0/+100
This function can be used to add fundamental dependencies such as glib to all build products in one fell swoop. This can be useful whenever, due to a project's coding conventions, it is not really possible to compile any source file without including the dependency. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-05-03dependencies: extract code to get all leaf dependenciesPaolo Bonzini3-16/+20
Extract to a separate function the code that resolves dependencies for compiler methods. We will reuse it for add_project_dependencies(). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-05-03interpreter: simplify checks in declare_dependencyPaolo Bonzini1-5/+3
Both dependencies.ExternalLibrary and dependencies.InternalDependency are subclasses of dependencies.Dependency, no need to list them separately. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-05-02complete documentation of declare_dependencyRemi Thebault2-1/+16
2022-05-02Fix wrong name in docRemi Thebault2-7/+6
The doc about declare_dependency states d_module_features instead of d_module_versions
2022-05-02docs: correct incorrect types for pch filesEli Schwartz1-1/+1
In the original RefMan 2.0 implementation, the types for this were filled in as `str | file`, but the code only ever accepted the former. Fix the documentation so that it aligns with reality. Fixes #10338
2022-05-01use shared implementation to convert files() strings to File objectsEli Schwartz1-1/+1
This handles various edge cases: - checks for sandbox violations just like all other functions - warn for direntry issues - check for generated files referred to via strings instead of the returned object (All valid use cases for wanting to sneak around the checks, are made to work via commit bba588d8b03a9125bf5c4faaad31b70d39242b68.)
2022-05-02Windows: Improve Python 3.8+ module check on WindowsChun-wei Fan1-1/+13
On Python 3.8.x and later, if the imported module requires non-system DLLs that are not installed nor bundled with the module package, os.add_dll_directory() must be called on every path that contains the required DLLs, so that the module can be imported successfully by Python. Make things easier for people by calling os.add_dll_directory() on the valid directories in %PATH%, so that such module checks can be carried out successfully with much less manual intervention.
2022-05-01mcompile: Print suggestions when target is ambigousXavier Claessens1-1/+8
Fixes: #10221
2022-05-01cmake: Fix CMake LLVM dependency error (fixes #10322)Daniel Mensinger1-2/+9
2022-05-01Add support for multiline f-stringsPeter Lesslie6-9/+101
+ Extend the parser to recognize the multiline f-strings, which the documentation already implies will work. The syntax is like: ``` x = 'hello' y = 'world' msg = f'''This is a multiline string. Sending a message: '@x@ @y@' ''' ``` which produces: ``` This is a multiline string. Sending a message: 'hello world' ``` + Added some f-string tests cases to "62 string arithmetic" to exercise the new behavior.
2022-05-01Convert if...error checks to assert() in string arithmetic testsPeter Lesslie1-11/+3
2022-05-01another day, another mypy update becomes stricter about typingEli Schwartz1-15/+15
Move GlobalState to a runtime T.NamedTuple, use it for constructing the tuple we are passing around rather than expecting mypy to detect that the one we already have matches.
2022-05-01Some documentation fix (#10335)Maple2-1/+1
* update sample image * increase size so all text will be shown
2022-05-01Merge pull request #10039 from eli-schwartz/wayland-protocols-subproject-filesJussi Pakkanen26-23/+223
dependencies: allow get_variable to expose files from subprojects
2022-04-30Ignore detached head warning while cloning subprojects with tagszxey1-1/+1
2022-04-30gnome: Make sure g-ir-scanner can use pkg-config properlyXavier Claessens1-0/+8
We need to setup the environment we pass to g-ir-scanner because it will try to use pkg-config to find dependencies, and that must respect user settings from machine file. Also make it use uninstalled pc files Meson generated in the case dependencies, such as glib, have been built as subproject.
2022-04-30pkgconfig: Use EnvironmentVariables to build PKG_CONFIG_* envXavier Claessens5-27/+36
The new get_env() method that returns an EnvironmentVariables object will be needed in next commit that will pass it to CustomTarget. This has the side effect to use the proper os specific path separator instead of hardcoding `:`. It is the obvious right thing to do here, but has caused issues in the past. Hopefully issues have been fixed in the meantime. If not, better deal with fallouts than keep doing the wrong thing forever.
2022-04-30use D compiler to check pointer size in test d/14Remi Thebault1-2/+2
2022-04-30add release snippetRemi Thebault1-0/+13
2022-04-30implement and test a few compiler checks for DRemi Thebault3-2/+166
- run - sizeof - alignment - has_header
2022-04-30linkers: Add support for mold linkerFini Jastrow12-51/+73
[why] Support for the relatively new mold linker is missing. If someone wants to use mold as linker `LDFLAGS="-B/path/to/mold"` has to be added instead of the usual `CC_LD=mold meson ...` or `CXX_LD=mold meson ...`. [how] Allow `mold' as linker for clang and newer GCC versions (that versions that have support). The error message can be a bit off, because it is generic for all GNU like compilers, but I guess that is ok. (i.e. 'mold' is not listed as possible linker, even if it would be possible for the given compiler.) [note] GCC Version 12.0.1 is not sufficient to say `mold` is supported. The expected release with support will be 12.1.0. On the other hand people that use the un-released 12.0.1 will probably have built it from trunk. Allowing 12.0.1 is helping bleeding edge developers to use mold in Meson already now. Fixes: #9072 Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2022-04-30qt module: fix missing sanity check for install_dir + installEli Schwartz1-0/+2
Regression in commit 11f96380351a88059ec55f1070fdebc1b1033117. When `install: true` the install_dir must be set. The CustomTarget initializer no longer checks this for us, so we must include the check ourselves.
2022-04-30qt module: fix broken install_dir kwargEli Schwartz1-2/+1
Regression in commit 11f96380351a88059ec55f1070fdebc1b1033117. We expect exactly one string as an install_dir, but CustomTarget started expecting it to be a list. So we need to pass it as such when forwarding compile_translations() arguments to the CustomTarget initializer.
2022-04-30devenv: Catch FileNotFoundErrorXavier Claessens1-0/+2
Fixes: #10310
2022-04-27Add small note that get_variable can publicize its data filesEli Schwartz1-0/+22
Nothing elaborate, just laying down the ground rules for expected usage and pointing out that it now works. The idea is not to give people ideas, but to let projects which already have this use case, use it with confidence.
2022-04-27Validate setting of install_tag for CustomTargetFerdinand Thiessen1-7/+3
2022-04-27gnome: Use 'doc' install_tag for gnome.yelpFerdinand Thiessen2-4/+7
2022-04-27improve help for -DdebugPaolo Bonzini2-2/+2
"Debug" is not a very helpful help message. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-04-25Visual Studio: Only use /utf-8 on VS2015 or later or clang-clChun-wei Fan1-0/+4
The compiler flag only exists on Visual Studio 2015 or later, or clang-cl, and using this always can interfere with compiler feature detection when this flag is not supported. So, remove '/utf-8' from always_args if we are on Visual Studio 2013 or earlier.
2022-04-24docs: Remove deprecated meson.source_root() from localisation page exampleSimon Arlott1-3/+1
Meson already supplies the same value
2022-04-23Fix typo that breaks g++ cross detection on Debian.Jussi Pakkanen1-1/+1
2022-04-23Do not use 'echo' as it is not available on plain cmd.exeJussi Pakkanen4-4/+10
2022-04-23Use system install scheme rather than the incorrect Debian one.Jussi Pakkanen1-4/+11
2022-04-21Allow deprecating an option for a new oneXavier Claessens6-4/+62
2022-04-21gtkdochelper.py: Use os.pathsep for --path argumentChun-wei Fan1-1/+1
This way, we can ensure that gtk-doc parses the --path argument correctly when passed in from the cmd.exe console, since ':' is normally used to denote that a drive is being used on local paths.
2022-04-20vcs_tag: handle non-str / non-file argumentsKirill Isakov3-7/+26
This makes vcs_tag behave like other commands so it accepts not only string and file arguments, but also exe, custom_tgt, and external_program.