aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
AgeCommit message (Collapse)AuthorFilesLines
2023-05-21Allow generator.process(generator.process(...))Volker Weißmann3-65/+108
Fixes #1141
2023-05-20rust: Add system libs used by rust std to staticlib external depsXavier Claessens3-0/+25
2023-05-20rust: Use Popen_safe() for sanity checksXavier Claessens1-11/+2
2023-05-20wrap: Check for common "provides" typoXavier Claessens1-0/+2
It is a common mistake that is hard to find because Meson silently ignore unknown sections. Better have an explicit error message.
2023-05-18Check dub version (#11794)Remi Thebault1-28/+58
* DubDependency._check_dub returns the version * check for compatible Dub version Dub versions starting at 1.32 have a new cache structure into which Meson doesn't know where to find compatible artifacts * skipping D tests involving Dub * refactor _check_dub makes mypy happier * make linters happy * localize some logic
2023-05-17summary: Add from which subproject each subproject have been calledXavier Claessens2-6/+12
2023-05-16rust compiler: use better sanity check logging comparable to the clike oneEli Schwartz1-7/+13
Don't spew debug-level info. Log the actual command line run.
2023-05-16meson_exe: print suitable debug information for DLL not found errorsEli Schwartz1-1/+2
It's particularly inscrutable if you do not know where DLLs weren't found because you don't know what the PATH was in the child process.
2023-05-15Metrowerks: move PCH args to the end of the command lineNomura1-1/+7
2023-05-13Make `dependency('foo', static: true, method: 'cmake') link staticallyVolker Weißmann2-0/+5
Fixes #1709
2023-05-13During reconfigure, show that no compiler was found, if compiler fails ↵Volker Weißmann5-12/+14
sanity check.
2023-05-13Fix paths of Fortran order dependenciesVolker Weißmann1-4/+5
Fixes #11047
2023-05-06Initial support for Metrowerks AssemblerNomura3-1/+125
2023-05-05mcompile: Fix target name suggestionsXavier Claessens1-1/+1
2023-05-05Fix building python extensions on win-arm64Radek Bartoň1-17/+8
2023-05-05Python module: emit warning for debug buildtypes with MSVC and no debug PythonRalf Gommers1-1/+24
CPython adds a hard to avoid hardcoded link flag to look for a debug libpython. This results in a very puzzling error, so emit a warning with a clear message. Note that pybind11 has a workaround for this, which undefines `_DEBUG`. So users who use only pybind11 can use non-release buildtypes, but they won't get debug symbols on Windows unless they have a debug build.
2023-05-03dependencies: allow config-tool to fallback to default program namesEli Schwartz2-1/+5
If the dependency permits it, we can just do a PATH search instead of mandating that it be listed in the cross file. This is useful for the limited case where a specific dependency is known to be compatible with any machine choice. Mark the pybind11 dependency as supporting this. It's a valid choice because pybind11 is a header-only C++ library.
2023-05-03cmake module: fix many typing issuesEli Schwartz1-23/+25
In #11761 it turned out that we failed to correctly handle all compiler.sizeof API changes in an old commit, breaking use of the module. And mypy could have caught this for us, except that the module is neither typed nor checked in CI. Partially solve this by adding lots of type annotations, greatly reducing the number of mypy errors in this file from 35 down to 12.
2023-05-03cmake module: make configured file correctly handle the do_conf_file APIEli Schwartz1-5/+5
This doesn't accept a dict, only an actual ConfigurationData object. Due to the way we poke at it, a dict can sort of work anyway, but might not if the internal layout isn't exactly correct. This is evidenced by the way we make the dict values be hard-to-read tuples containing emptiness, because that's how ConfigurationData objects handle descriptions. Simplify and make the seed dictionary readable, then actually convert it into a real ConfigurationData. Bonus: this now passes type checking.
2023-05-03cmake module: use more typed_pos_args for consistencyEli Schwartz2-20/+10
It's shorter and more descriptive. Although we always enforce the same rules either way, a unified decorator is one less line of code for each location, and also tells you how many "too few" arguments you *did* pass.
2023-05-03Visual studio: Generate vcxproj.filters files to adds filters to imitated ↵Renan Lavarec1-0/+62
directories to navigate more easily in the source files.
2023-05-03python bytecompile: use correct install tagEli Schwartz1-1/+1
2023-05-02bytecompile: switch to handling destdir in the script launcher envEli Schwartz2-20/+20
2023-05-02python module: add an automatic byte-compilation stepEli Schwartz3-4/+130
For all source `*.py` files installed via either py.install_sources() or an `install_dir: py.get_install_dir()`, produce `*.pyc` files at install time. Controllable via a module option.
2023-05-02update the devenv module hooks to support generic modifications to BuildEli Schwartz3-10/+10
We may want to do things like update install scripts as well, which have to happen before generating the backend. Instead of adding one module method per thing to do, use a single function that allows for modifying the Build object directly.
2023-05-02extend install scripts to allow specific directory variable exportsEli Schwartz3-5/+14
This is useful for internal scripts that want to know about something other than MESON_INSTALL_PREFIX and MESON_INSTALL_DESTDIR_PREFIX, which is very specific to the prefix.
2023-05-02fix regression in precomputing CMAKE_SIZEOF_VOID_PMaxHearnden1-1/+1
In commit 808d5934dd6c6a6c16f66e9dc51dae6e83e02cef, compiler.sizeof was refactored to introduce caching, but cmake subprojects did not adapt to that API change and ended up embedding the python repr of a tuple as a cmake variable.
2023-05-02Log python name when not foundCharles Brunet1-3/+3
Fixes #11686.
2023-05-02Find python3.xx on windowsCharles Brunet1-2/+2
2023-05-02Ensure python fallback has the right versionCharles Brunet1-1/+2
Fixes #11057
2023-05-01extract_all_objects: Include PCH object with MSVCXavier Claessens4-5/+20
This changes the object file name with ninja backend to match the name used by vs backend and add it in outputs of the ninja rule.
2023-05-01Rust: Allow Rust static libraries to link_whole other librariesXavier Claessens1-1/+1
Rustc can do it without needing Meson to extract all objects.
2023-05-01build: Process compilers before calling link() and link_whole()Xavier Claessens3-30/+23
To take good decisions we'll need to know if we are a Rust library which is only know after processing source files and compilers. Note that is it not the final list of compilers, some can be added in process_compilers_late(), but those are compilers for which we don't have source files any way.
2023-05-01build: Don't do a deep copy of kwargsXavier Claessens2-15/+2
It seems to only be used by the Rust module now, and it already does a copy.
2023-05-01Rust: C static library cannot link_whole Rust static libraryXavier Claessens1-12/+11
2023-05-01Fix niche cases when linking static libsXavier Claessens1-16/+48
Case 1: - Prog links to static lib A - A link_whole to static lib B - B link to static lib C - Prog dependencies should be A and C but not B which is already included in A. Case 2: - Same as case 1, but with A being installed. - To be useful, A must also include all objects from C that is not installed. - Prog only need to link on A.
2023-04-29wrap: Always pass posix paths to patchNirbheek Chauhan1-1/+2
patch on Windows is provided by MSYS, which only understands POSIX paths, with `/`. Using Windows paths with `\` results in a "file not found" error. We got a little lucky here because the path is relative, so the drive letter difference doesn't affect us.
2023-04-28detect_cpu: Fix mips32 detection on mips64Cyan1-1/+9
MIPS64 can run MIPS32 code natively, so there is a chance that a mixture of MIPS64 kernel and MIPS32 userland exists. Before this Meson just treats such mixture as mips64, because uname -m returns mips64. So in this case we have to check compiler builtin defines for actual architecture and CPU in use. - Also fixes mips64 related detection tests in internaltests: Normalize mips64 as mips first, then if __mips64 is defined, return mips64 for mips64* machines. This is a bit confiusing because normally one would detect if a flag of 32-bit target is defined while running on a 64-bit machine. For mips64 it is almost just the other way around - we need to detect if __mips64 is set to make sure it is a mips64 environment. Co-Authored-By: Jue Wang <maliya355@outlook.com>
2023-04-27Don't use dyndep scanner when preprocessingVolker Weißmann1-0/+2
Fixes #11504
2023-04-26Add env kwarg to gnome.generate_gir().Volker Weißmann2-1/+9
Fixes #384
2023-04-26Set the CC environment variable for g-ir-scanner.Volker Weißmann1-1/+4
Fixes #1035
2023-04-25Fix html coverage report generation when using clang on linuxJakob Widauer1-1/+1
2023-04-24yasm: Fix usage of incompatible optimization flagsL. E. Segovia1-0/+4
Fixes #11726
2023-04-24mtest: prevent parse error with gtest protocolCharles Brunet1-1/+5
Replace illegal characters when reading gtest generated xml file, to prevent a ParseError and a stacktrace. catch et.ParseError, just in case, to prevent stopping other tests if the xml file was malformed.
2023-04-24dependencies: allow to fallback on CMake to find the SDL2 libraryMatthieu Bouron1-1/+2
On Windows, the SDL2 library is generally provided with only CMake config files. This commit allows meson to fallback on CMake as a last resort to find the SDL2 library.
2023-04-24Initial support for Metrowerks C/C++ compilerNomura8-4/+485
2023-04-23fix python.version() not working in some casesCharles Brunet1-0/+1
import('python').find_installation('python').version() causes exception because of a missing initialization, when `find_installation()` receives a name or a path.
2023-04-21rust: Add new `rust_dependency_map` target configurationSebastian Dröge3-12/+18
This allows changing the crate name with which a library ends up being available inside the Rust code, similar to cargo's dependency renaming feature or `extern crate foo as bar` inside Rust code.
2023-04-21modules/rust: Add -DNDEBUG to bindgen if b_ndebug is falseDylan Baker1-0/+3
Otherwise bindgen may generate different behavior than the compiled C code actually has.
2023-04-21rust: add support for b_ndebugDylan Baker1-1/+5
Rust has a `debug_assert!()` macro, which is designed to be toggled on the command line. It is on by default in debug builds, and off by default in release builds, in cargo. This matches what meson's b_ndebug option does in `if-release` mode.