summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-03-18mconf: Reload the options files if they have changedDylan Baker
This fixes issues where a new option is added, an option is removed, the constraints of an option are changed, an option file is added where one didn't previously exist, an option file is deleted, or it is renamed between meson_options.txt and meson.options There is one case that is known to not work, but it's probably a less common case, which is setting options for an unconfigured subproject. We could probably make that work in some cases, but I don't think it makes sense to download a wrap during meson configure.
2024-03-18coredata: add tracking of the options filesDylan Baker
When we load the option file in the interpreter record which file it was, and what the hash of that file was. This will let `meson configure` know that the options have changed since the last re-configure.
2024-03-18coredata: remove extraneous keys when updating project_optionsDylan Baker
This can happen when a project's meson.options file is updated, and an old option is removed.
2024-03-18tests: Add tests for configure on changed optionsDylan Baker
This demonstrates a limitation of Meson that can happen in the following situation: `meson setup builddir` <update to meson.options> (such as git pull) `meson configure -Dnew_option=value builddir` <Error> Since Meson is unaware of the updates to the meson.options file. The purposes of these tests is to fix this behavior.
2024-03-18unittests: annotate BasePlatformTests.setconfDylan Baker
2024-03-18cmake: fix incorrect decorator for append_link_argsStephan Lachnit
Signed-off-by: Stephan Lachnit <stephanlachnit@debian.org>
2024-03-17environment: update Debian development version in get_llvm_tool_names()Sam James
As far as we can ascertain, the idea here was supposed to be that this version at the bottom gets updated as a last-resort for development LLVMs on Debian. Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2024-03-17environment: fix LLVM 18 support in get_llvm_tool_names()Sam James
In 67afddbf431140c1ee064bf79a2fa5a95575488e, we added LLVM 18, but LLVM >= 18 uses a new version scheme of X.Y, not X.0.Y (where using "X" was enough). See https://discourse.llvm.org/t/rfc-name-the-first-release-from-a-branch-n-1-0-instead-of-n-0-0/75384. Without this, I get a test failure: ``` mesonbuild.interpreterbase.exceptions.InterpreterException: Assert failed: config-tool and cmake returns different major versions -> frameworks: 15 llvm (method=combination link-static=False) ``` Fixes: https://github.com/mesonbuild/meson/issues/12961 Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2024-03-17tests: rename skip_on_jobname to expect_skip_on_jobname and skip_on_os to ↵Christoph Reiter
expect_skip_on_os The test.json format currently has three keys related to skipping tests: * `skip_on_jobname` * `skip_on_os` * `skip_on_env` While `skip_on_env` marks the test itself as skipped, i.e. they don't get run when the conditions are met, the other two skip options are just marking the test as "expected to be skipped" if the conditions apply, i.e. they want to see `MESON_SKIP_TEST` in the output and things will fail if that doesn't happen. They don't actually skip the tests as the names imply. To make this clearer rename the keys: * `skip_on_jobname` -> `expect_skip_on_jobname` * `skip_on_os` -> `expect_skip_on_os` `skip_on_env` stays the same, since that actually skips. The docs were also confused about this, so adjust that too.
2024-03-15tests: Fix unit tests with high parallelismJan Alexander Steffens (heftig)
On Arch's shiny new 48-core/96-thread build server, the `test_install_log_content` test fails because of an unexpected `invalid-symlink.txt` file. Apparently the test runs in parallel with `test_install_subdir_symlinks`, which modifies the `59 install subdir` source directory. To fix this, make `install_subdir_invalid_symlinks` copy the entire test into a tmpdir before modifying it.
2024-03-15unittests: Add a helper for copying source treesDylan Baker
This is a useful thing to do when a test needs to modify the source tree, as it prevents races between tests.
2024-03-15Improve error messages for invalid option valuesCharles Brunet
By adding the option name to UserOption object, it is now possible to display the name of the affected option when the given option value is not valid. Fixes #12635
2024-03-15move UserArrayOption.listify_value to mesonlibCharles Brunet
This function is used at 3 different places and it does not justify it as being a staticmethod instead of being a free function.
2024-03-15interpreter: when overriding a dependency make its name matchDylan Baker
Otherwise internal dependencies have auto-generated names that are not human readable. Instead, use the name that the dependency overrides. For example: ```meson meson.override_dependency('zlib', declare_dependency()) dep_zlib = dependency('zlib') assert(dep_zlib.name() == 'zlib') ``` Fixes: #12967
2024-03-15dependency: define equality and hash operators for DependencyDylan Baker
When a dependency is copied and its name is changed, we still need a way to say "this is the same dependency", which we now have.
2024-03-15rust: Get native-static-libs even when it cannot run host binariesXavier Claessens
When rustc cannot run host binaries it does an early return which skipped getting native-static-libs. Move that code earlier to always run it. While at it, failing to determine those libs is a fatal error. We would crash later when trying to access rustc.native_static_libs attribute otherwise.
2024-03-15compilers: No need to pass exe_wrapper everywhereXavier Claessens
Places where compiler needs it already have access to Environment object and can use it directly. This fixes mypy complaining that not all compilers have self.exe_wrapper in run() method that got moved to base class.
2024-03-15compilers: Allow setting env and workdir for run checksXavier Claessens
This is not exposed in API, but will be used internally.
2024-03-15compilers: Do not dump File content in log for compiler checks.Xavier Claessens
When doing a compiler check with a File object, there is no need to dump the file into logs, we can just print the path. The file could potentially be big.
2024-03-15compilers: Every compiler can run codeXavier Claessens
Compiling and linking code is part of the Compiler base class, there is no reason it cannot also run executables.
2024-03-15wayland: Stable protocols can have a versionXavier Claessens
Fixes: #12968
2024-03-15cargo: Add API version into dependency nameXavier Claessens
2024-03-15cargo: Ensure Dependency.package always has a valueXavier Claessens
2024-03-14interpreterobjects.py: fix a typoYegor Yefremov
Use a capital letter at the beginning of a sentence.
2024-03-13Generate relnotes for 1.4.0.Jussi Pakkanen
2024-03-13compilers: cpp: improve libc++ vs libstdc++ detection (again)Sam James
The previous approach wasn't great because you couldn't control what the detected C++ stdlib impl was. We just had a preference list we tweaked the searched order for per OS. That doesn't work great for e.g. Gentoo with libc++ or Gentoo Prefix on macOS where we might be using libstdc++ even though the host is libc++. Jonathan Wakely, the libstdc++ maintainer, gave a helpful answer on how to best detect libc++ vs libstdc++ via macros on SO [0]. Implement it. TL;DR: Use <version> from C++20 if we can, use <ciso646> otherwise. Check for _LIBCPP_VERSION as libstdc++ doesn't always define a macro. [0] https://stackoverflow.com/a/31658120 Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2024-03-12Added support for Texas Instruments C6000 compiler.Petr Machacek
2024-03-12Bump version number for new development.Jussi Pakkanen
2024-03-12Bump version number for release.Jussi Pakkanen
2024-03-11Only link to generated pch object when using msvc. (#12957)Elliot
backend: Only link to generated pch object when using msvc
2024-03-11CI: pin mypy to version 1.8Dylan Baker
Version 1.9 removes support for python 3.7, so we either need to pin the version to 1.8 as long as we're support Python 3.7, or we need to drop linting for 3.7
2024-03-10fix reconfigure subproject base optionsCharles Brunet
2024-03-10Fix detection of unknown base options in subprojCharles Brunet
cc4cfbcad92945a1629c80664e1eb755c68905dd added detection for unknown base options, but it was not working for subproject base options. This should fix it.
2024-03-06cuda: respect host compiler `-Werror`David Seifert
The cuda compiler also executes the host compiler and generally needs to know the host compiler flags. We did this for regular args but not for error args. We use `-Xcompiler=` since that's how nvcc tells the difference between args it uses itself for device code and args it passes to the host compiler. Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> [eli: fix quoting style]
2024-03-05rust: Link with rlib external dependenciesXavier Claessens
When linking with a Rust rlib, we should also link with its external system dependencies. This was currently done only for C ABI crates, do it for both rlib and staticlib now.
2024-03-04test cases/common/103 has header symbol: fix for musl 1.2.5Alyssa Ross
musl 1.2.5 exposes this symbol in the default profile, and in future will expose it unconditionally, as it is on track to becoming part of POSIX. So rather than maintaining a list of systems to run this on, let's just skip testing the feature test macro if we find ppoll in the default profile.
2024-03-04doc/Users: Add asteria and mcfgthreadLIU Hao
2024-03-03Bump version number for rc2.Jussi Pakkanen
2024-03-03Condense test dirs for rc2.Jussi Pakkanen
2024-03-03compilers: only wrap multiple input libraries with start/end groupEli Schwartz
When only a single input file shows up in an arglist, it makes no sense to inject `-W,--start-group -lone -Wl,--end-group`, since there is nothing being grouped together. It's just longer command lines for nothing.
2024-03-03compilers: avoid catching -Wl,-soname and wrapping with start/end groupEli Schwartz
This is just a bad regex match, because it matches *.so as a prospective filename input even though it is actually not an input but a linker flag. --start-group is only relevant to input files...
2024-03-02Merge pull request #12804 from joukewitteveen/dist-rewriterJussi Pakkanen
Support `meson dist` when getting project versions from VCS
2024-03-01Fix unknown base options not detected in commandline argumentsCharles Brunet
2024-03-01Fix base and compiler options not reconfigurable.Charles Brunet
Fixes #12920.
2024-03-01Set PYTHONIOENCODING when running testsCharles Brunet
For instance, on Windows, if the terminal is in cp65001, the subprocess output is not encoded correctly and it results in error when running unit test.
2024-03-01Revert "Fix base options not reconfigurable"Charles Brunet
This reverts commit 98db3e7a2e498a6d96ec50b39ef51ef312d6f0a3.
2024-02-29rust: recursively pull proc-macro dependencies as wellXavier Claessens
When the proc-macro rlib is in a different subdir, it would miss the needed -L argument and rustc would not find it. Meson was assuming that proc-macros are only needed when building libraries that uses it, but it turns out that was wrong, as show by the unit test.
2024-02-28nvcc: avoid adding `-Wpedantic` to compile linesDavid Seifert
* `-Wpedantic` creates useless churn due to its use of gcc-line directives: ../foo.cu:1:3: warning: style of line directive is a GCC extension 1 | namespace Foo { | ^~ https://stackoverflow.com/a/31001220
2024-02-28remove junk file from the repository rootEli Schwartz
Sider has not been used by meson for a long time. Also it appears to no longer exist.
2024-02-27cargo: support lib.path in Cargo.tomlAlyssa Ross
Cargo implements this configuration option to override the entry point of the library. To get test coverage, I've modified one of the two Cargo subprojects in the test to use a non-default library entrypoint. The other still uses the default.