aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-04-11Add c++23 to the list of C++ standards.cpp23Jussi Pakkanen1-4/+4
2023-04-10Bump version number for new development.Jussi Pakkanen1-1/+1
2023-04-10Bump version number for release.1.1.0Jussi Pakkanen1-1/+1
2023-04-10Generate relnotes for 1.1.0.Jussi Pakkanen20-198/+225
2023-04-04propagate the most accurate node to error messagesEli Schwartz48-50/+53
During evaluation of codeblocks, we start off with an iteration of nodes, and then while evaluating them we may update the global self.current_node context. When catching and formatting errors, we didn't take into account that the node might be updated from the original top-level iteration. Switch to formatting errors using self.current_node instead, to ensure we can point at the likely most-accurate actual cause of an error. Also update the current node in a few more places, so that function calls always see the function call as the current node, even if the most recently parsed node was an argument to the function call. Fixes #11643
2023-04-04tests: make it easier to read overall results in githubEli Schwartz1-1/+7
Use collapsible sections for cicmds.
2023-04-03tests/94 threads: fix build error with clang 16Christoph Reiter1-1/+1
It fails with "incompatible-function-pointer-types" otherwise
2023-04-03get_llvm_tool_names: add released llvm versionsChristoph Reiter1-0/+2
2023-04-02Bump version number for rc2.1.1.0rc2Jussi Pakkanen2-2/+2
2023-03-30fix regression that broken git-based wraps with dirty contentsEli Schwartz1-1/+2
In commit 8da060706c2c34fbea91898509123cb190894f3e we fixed an issue where stashing would ignore untracked files, potentially conflicting with what we reset to. Unfortunately in the process it broke the functionality entirely, by producing an invalid git command... according to some versions of git. This is actually a git bug, fixed upstream in git 2.37.0 via commit b02fdbc80a41f73ceb6c99e8e27b22285243a335. It causes git itself to re-synthesize the command line for a negation pathspec with a "." rather than "", as that's what is needed to make it match all files other than the negation. For backwards compatibility to older versions of git, we manually pass the dot pathspec ourselves.
2023-03-30backend/vs: ensure that build dir is preferred to src dirBarnabás Pőcze1-1/+2
Previously, the VS backend would add the the include directories in the reverse order that the Ninja backend does it, which means that the source directories would be preferred over the build directories. For example, this would cause the compiler to choose the file from the source directory if a file with the same name is found in both. Fixes 57ec097b5 ("vs: Use CompilerArgs() for compile and link args") Fixes #11630
2023-03-30tests: add test to ensure that build dir is preferred to src dirBarnabás Pőcze4-1/+7
Extend the "common/include order" test to ensure that the build directory is preferred over the source directory. For example, when using `configure_file()`, the resulting file should be preferred over a file with the same name in the source directory.
2023-03-30msetup: Allow (re)configure of not empty builddirXavier Claessens3-1/+40
Also prevent from using a parent directory as builddir by mistake. Co-authored-by: Volker Weißmann <volker.weissmann@gmx.de> Co-authored-by: Charles Brunet <charles.brunet@optelgroup.com>
2023-03-30msetup: use more consistent exceptions on exitXavier Claessens2-11/+18
- MesonException for errors is clearer than SystemExit('error message') and provides meson-formatted "ERROR: ..." - `raise SystemExit` with no parameter isn't obvious that it intends to exit successfully While clarifying the latter, it was observed to cause test_preprocessor_checks_CPPFLAGS() failure to be ignored. That test checks get_define() on both c and cpp compilers, which means we need to define either CPPFLAGS or both CFLAGS+CXXFLAGS.
2023-03-30coredata: Fix changing prefix optionXavier Claessens2-6/+6
This is a regression from #11537.
2023-03-29Make --vsenv a readonly builtin optionXavier Claessens13-24/+45
We need to remember its value when reconfiguring, but the Build object is not reused, only coredata is. This also makes CLI more consistent by allowing `-Dvsenv=true` syntax. Fixes: #11309
2023-03-28test cases: make various things werror-safeEli Schwartz5-4/+11
Allows getting closer to `./run_project_tests.py -- -Dwerror=true`. - when argc and argv are not *both* used, there's a standard, compliant mechanism to mark the variable as unused - generated code should not build as -Werror - more thoroughly comment out some commented code
2023-03-28python dependency: avoid redefinition warnings for MS_WIN64Eli Schwartz1-1/+1
pyconfig.h defines it in limited cases, but as empty, rather than as "1" which is what command-line defines generally do. Explicitly define it as a compatible definition so the compiler does not log a warning that the value has changed. Fixes #11592
2023-03-28test that python modules nominally compile without warningsEli Schwartz1-1/+1
Because we poke around with the dependency, so we might introduce some, and have at least once.
2023-03-28doc: Use better name for builtin/return object titleXavier Claessens2-1/+2
The title is used only in the sidebar. There is no need to have "extends" information there. For returned objects the actual name is not meaningful so it's better to use the long name. For builtin objects the name is important because that's the global variable name.
2023-03-28doc: Fix some broken linksXavier Claessens2-3/+3
2023-03-28Bump version number for rc1.1.1.0rc1Jussi Pakkanen2-3/+3
2023-03-28Condense test directories for rc1.Jussi Pakkanen93-23/+23
2023-03-28Fix validation regexes to handle rc version numbers.Jussi Pakkanen2-2/+2
2023-03-28backends: fix bug where meson_exe crashed if constructed with found programsEli Schwartz3-2/+2
Because we base the pickled data name on the name property of the command being run... and for built targets, `exe.name` is always just the name. However, for an ExternalProgram this is just whatever string we searched for, so, NOT just the basename. This became a bigger issue once we started using generator() with the actual program in commit 6aeec808367f05463394e30a8d40834e97c7afc0, rather than first casting it to a string, because the VS backend *always* uses the meson_exe approach for various reasons related to VS being VS. Outside of that, it's difficult to actually get an ExternalProgram object passed to meson_exe -- CustomTarget lowers it to a string, capture is handled via argparse instead of pickling, etc. Fixes #11593
2023-03-28do not resolve symlinks when calculating the meson commandEli Schwartz2-3/+2
We embed the route to executing meson in various cases, most especially regen rules in build.ninja. And we take care to ensure that it's a canonicalized path. Although the code has moved around over time, and adapted in ways both bad and good, the root of the matter really comes down to commit 69ca8f5b544f700210d9f18613311bcce3c2e37a which notes the importance of being able to run meson from any location, potentially not on PATH or anything else. For this reason, we switched from embedding sys.argv[0] to os.path.realpath, a very heavy stick indeed. It turns out that that's not actually a good thing though... simply resolving the absolute path is enough to ensure we can accurately call meson the same way we originally did, and it avoids cases where the original way to call meson is via a stable symlink, and we resolved a hidden location. Homebrew does this, because the version of a package is embedded into the install directory. Even the bugfix release. e.g. ``` /opt/homebrew/bin/meson ``` is symlinked to ``` /opt/homebrew/Cellar/meson/1.0.0/bin/meson ``` Since we went beyond absolutizing the path and onwards to canonicalizing symlinks, we ended up writing the latter to build.ninja, and got a "command not found" when meson was upgraded to 1.0.1. This was supposed to work flawlessly, because build directories are compatible across bugfix releases. We also get a "command not found" when upgrading to new feature releases, e.g. 0.64.x to 1.0.0, which is a terrible error message. Meson explicitly "doesn't support" doing this, we throw a MesonVersionMismatchException or in some cases warn you and then effectively act like --wipe was given. But the user is supposed to be informed exactly what the problem is, rather than getting "command not found". Since there was never a rationale to get the realpath anyways, downgrade this to abspath. Fixes #11520
2023-03-28docs: replace most uses of `meson_options.txt` with `meson.options`Dylan Baker6-7/+8
I've left the old release notes in place, but updated everything else to use `meson.options`
2023-03-28Add support for meson.options as a replacement for meson_options.txtDylan Baker16-18/+61
We will still try to load `meson_options.txt` if `meson.options` doesn't exist. Because there are some advantages to using `meson.options` even with older versions of meson (such as better text editor handling) we will not warn about the existence of a `meson.options` file if a `meson_options.txt` file or symlink also exists. The name `meson.options` was picked instead of alternative proposals, such as `meson_options.build` for a couple of reasons: 1. meson.options is shorter 2. While the syntax is the same, only the `option()` function may be called in meson.options, while, it may not be called in meson.build 3. While the two files share a syntax and elementary types (strings, arrays, etc), they have different purposes: `meson.build` declares build targets, `meson.options` declares options. This is similar to the difference between C's `.c` and `.h` extensions. As an implementation detail `Interpreter.option_file` has been removed, as it is used exactly once, in the `project()` call to read the options, and we can just calculate it there and not store it. Fixes: #11176
2023-03-28Import cpu detection fix from Debian.Jussi Pakkanen1-0/+1
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033579
2023-03-27Allow --reconfigure and --wipe of empty builddirXavier Claessens2-13/+23
This allows to run setup command regardless whether the builddir has been configured or not previously. This is useful for example with scripts that always repeat all options. meson setup builddir --reconfigure -Dfoo=bar
2023-03-28unittests: Pass the exact backend nameXavier Claessens3-5/+7
CI runs with vs2019 and we were passing --backend=vs. This fix reconfigure tests because we can't reconfigure with --backend=vs when initial configuration determined the backend is actually vs2019.
2023-03-28Make backend option read-onlyXavier Claessens3-11/+46
2023-03-27find dll path on WindowsCharles Brunet1-10/+34
When running tests on Windows (or for devenv), paths of shared libraries need to be added to the PATH envvar for Windows to be able to find them. Meson is currently using the path of the import lib, which is wrong in many cases. This fix does two things: if there is a variable bindir in the pkg-config file, those variable values are added to the list of path. This is for conan dependencies, if conan decides to export those paths. See https://github.com/conan-io/conan/issues/13532 . The fallback is to replace `lib` by `bin` in the import library path. This heuristic will work most of the time (but the bin directory could have a different name, or the dll itself could have a different name). In all cases, it cannot be worse than current implementation, and it solves many cases.
2023-03-27custom_target: libfoo.so.1 is linkableXavier Claessens2-5/+18
2023-03-27Write wrap-redirect filename as posix pathDenis Fortin1-4/+4
2023-03-27docs: add 2022 video from PyCon USandy59951-0/+3
2023-03-26tests: fix critical existence failure of doxygen testEli Schwartz3-4/+4
It was totally subproject-unsafe, and setting a super bad example. This is bad, because doxygen is annoying to get right and we occasionally tell people to go use our example test case. There is a fun nuance here, that makes doxygen unpredictably work on some versions, and fail on others. Specifically, values must be quoted in doxygen 1.8, but not in doxygen 1.9, or they break -- but only if the output directory contains spaces. This was "fixed" in commit https://github.com/doxygen/doxygen/commit/ef91bacb7a69bbf7bccb4a864698cc003aabac66 which actually caused it to act like an unquoted OUTPUT_DIRECTORY is not provided at all, and then fixed for real in commit https://github.com/doxygen/doxygen/commit/eb3d1eb5ad85c94d6f2c32934fce2b8630331d6c For portability, it is necessary to quote this just to be on the safe side. Fixes #11579
2023-03-24Add a system method for obtaining GL dependency on Linux OSHelen Ginn1-1/+9
2023-03-23asm: Add sx extensionRenan Lavarec6-1/+7
docs: gcc https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html scons: https://scons.org/doc/3.0.5/HTML/scons-user/apb.html .S Windows: assembly language file ARM: CodeSourcery Sourcery Lite .sx assembly language file + C pre-processor POSIX: assembly language file + C pre-processor
2023-03-21Fix run_tool() when git is not installedAlyssa Ross1-3/+3
Previously, it would raise an exception.
2023-03-20fix one more missing explicit "setup" subcommandEli Schwartz1-0/+1
2023-03-20project tests: add log of the setup command being runEli Schwartz2-6/+9
Followup to commit 2acb6ee79e24db047800da30f5f4ac52cb9c012d.
2023-03-20backends: add a new "none" backendEli Schwartz12-10/+91
It can only be used for projects that don't have any rules at all, i.e. they are purely using Meson to: - configure files - run (script?) tests - install files that exist by the end of the setup stage This can be useful e.g. for Meson itself, a pure python project.
2023-03-20tests: fix regression that broke mtest_inprocessEli Schwartz1-1/+1
In commit faf79f4539841cbf89fe8d53cf35aa91fd8273c9 we broke this utility function by referencing a non-existent variable. Fortunately, the only time we ever used said function was once, and that in a test case where we tested that it raised a MesonException before the undefined variable error could occur.
2023-03-20mtest: move the detection of rebuild compatibility out into the entry pointEli Schwartz1-6/+6
What we are mainly doing here is checking that the options make sense, or fixing that up if they don't. And in the next commit we will want to do that by also checking the build object.
2023-03-20backends: simplify class setupEli Schwartz9-9/+25
2023-03-20Add restat = 1 to the fortran_COMPILER ruleVolker Weißmann1-1/+4
gfortran does not update the modification time of *.mod files. Fixes #11552
2023-03-19CUDA: make "Ampere" equivalent to SM8.0+SM8.6David Seifert1-1/+8
2023-03-18Small fix on how cc.sizeof (and similar functions) use the 'prefix' kwargVolker Weißmann1-14/+14
2023-03-17Better error message when custom_targets has duplicates in the output kwargVolker Weißmann1-0/+7