summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-01-31dependencies: hdf5: mark configtool dependency not-found for cmake buildEli Schwartz
When hdf5 is built with cmake instead of autotools, it makes a number of weird changes. What we care about in particular is that h5cc exists but doesn't work -- it happily ignores -show and tries to compile stuff, then leaves us with a dependency that has no libraries, and fails when running `ninja`. See: #12748
2024-01-30rust: Add `--extern proc_macro` in `rust.proc_macro() not in cargo translationDylan Baker
Cargo does this by default, so it's reasonable that we do the same. Fixes: #12758
2024-01-28python module: correct the embedded path for bytecompiled filesEli Schwartz
In recursive scanning, a script variable was overwritten that caused the logic *intended* to make the embedded path be trimmed based on $DESTDIR, to no longer apply. This resulted in embedding the staging path, but only when install_subdir() was used instead of specifying each file as the argument to install_sources.
2024-01-26Differentiate message between dynamic linker and archiverDylan Baker
Currently both print `Detecting linker via`, which can be confusing. Clarifying this by printing "archiver" instead of "linker" for the static linker/archiver
2024-01-26xcode: Fix "clean" operation under new build systemAlbert Tang
Xcode 14 has dropped the legacy build system, forcing us to use the new one introduced in Xcode 9. The new system requires that we conform to its "clean build folder" behavior, or clean operations fail. CMake achieves this by setting other variables instead of SYMROOT, so we follow that approach while retaining our current behavior as much as possible. Ref: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7730
2024-01-26xcode: Check custom target input for extracted objectsAlbert Tang
If there are any specified, the build target that generates them must be added as a dependency.
2024-01-26backends: Make object_filename_from_source() backend-agnosticAlbert Tang
Some backends may need to use its own target directories instead of our default one. For this, introduce an optional argument "targetdir" that will still use our default one when not specified.
2024-01-26xcode: Autodetect host machine's CPU architectureAlbert Tang
Currently, the backend has "x86_64" hardcoded as the architecture, which breaks cross compiling and compiling normally on arm64. Fix this by setting it to the host machine's CPU architecture instead.
2024-01-25Fix compiler.preprocess compile_args not usedCharles Brunet
As described in https://github.com/mesonbuild/meson/issues/12715#issuecomment-1883448780, the compiler.preprocess function ignores compile_args. This should fix it in both ninja and visualstudio backends.
2024-01-25docs: Use common conventions for shared libsSune Vuorela
Use common conventions for documentation of shared library version and soversion. In general, the numeric version part is expected to be first component of version, so suggest this in the example code.
2024-01-25interpreter: replace mock keyword argument with unittest.mockDylan Baker
Python provides some nifty tools for mocking, without relying on altering running code. We should use these to simplify the actual run paths and move the complicated logic into tests.
2024-01-25modules/fs: use ModuleState object instead of Interpreter when possibleDylan Baker
2024-01-25modules/sourceset: remove unused attributes from SourceSetImplDylan Baker
2024-01-25Add missing FeatureNew for meson.add_dist_scriptEli Schwartz
Per the docs, it is available since 0.48.0. Notify about this at runtime too. Fixes #12773
2024-01-24docs: add a technically unneeded "setup" verb to some invocationsEli Schwartz
`meson <options> -Dxxx=yyy` is technically accurate, but does cause confusion at least some of the time.
2024-01-24docs: Add NetPanzer to User.mdandy5995
2024-01-20docs: fix another regression in having functional docsEli Schwartz
In commit 83a973ca04cf53dd98ff487b4273155b82cf554a a bunch of strange changes were made, that were not even tested. Make sure people get the correct command for running coverage targets.
2024-01-18linkers_detect: detect xtools (Apple ld64 derivative)Fabian Groffen
xtools is in use on Gentoo Prefix x86_64 and ppc based Darwin installs. Pick it up as a valid linker. Since xtools is answering with a version to --version, as opposed to ld64, detection of xtools in the ld64 handling block is not possible, since --version already succeeded. Bug: https://bugs.gentoo.org/868516 Bug: https://github.com/mesonbuild/meson/issues/10805 Signed-off-by: Fabian Groffen <grobian@gentoo.org> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2024-01-18Compilers: pass -Werror to the linker with b_ltoSam James
With LTO, the linker will re-execute the compiler and various warnings may be emitted. We must therefore pass -Werror to the linker as well when -Werror is enabled to capture these. This is only required / useful with LTO. Closes: https://github.com/mesonbuild/meson/issues/7360 Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2024-01-17compiler.preprocess: add depends kwargStas Sergeev
This patch adds 'depends' keyword to compiler.preprocess(). It allows to execute other targets before doing the preprocessing. Test-case is added to demonstrate that functionality: it generates the header before preprocessing the C source that uses that generated header. Thanks to @bruchar1 for getting this patch to work.
2024-01-17rust: fix linking static executablesAlyssa Ross
For the same reason as for static libraries, we have to use -l when generating static executables. Fixes: https://github.com/mesonbuild/meson/issues/12585
2024-01-17fix openmp dependency for clang-clPeter Urban
- see https://github.com/mesonbuild/meson/issues/5298
2024-01-17Improve project naming and build configuration in genvslite projectsRoger Sanders
This change fixes two usability issues with the genvslite project generation. Unlike when using the full VS backend, under genvslite the ProjectName property wasn't being set for generated projects. This means projects end up being named according to the project files, which includes suffixes like "@exe" in the solution, which is undesirable. This change adds the ProjectName field in for genvslite projects, to keep the naming consistent with projects under the VS backend. Additionally, previously under genvslite, no projects were set to build under any solution configuration by default. This is inconvenient, as the user has to manually edit the build settings for each solution configuration before they can compile at the solution level. There was a note in the code to do something about this. This change enables compilation at the solution level for the default startup project in the solution, so the user can now just press F5 to build the solution and run the default startup project, as they would typically expect.
2024-01-17tests: Also test implicit rpaths from dependenciesJonathon Anderson
Meson will implicit rpaths when *.so/*.dll/etc. files are injected onto the link line from pkg-config and (now) cmake dependencies. Extend the "prebuilt shared" tests to test that these are added.
2024-01-17backend: Add rpath for external versioned .so'sJonathon Anderson
On Linux many .so's are augmented with version information, e.g. libxyz.so.1.2.3. CMake will happily refer to these versioned .so's in its dependencies instead of libxyz.so (typically a symlink). Unfortunately these versioned .so's aren't recognized as libraries by the Backend's logic to produce build rpaths from library paths. Fix this by recognizing any .so extension as sufficient reason to produce a build rpath, not just if .so is the last extension.
2024-01-17backend: Add rpaths for external 'cmake' depsJonathon Anderson
Fixes https://github.com/mesonbuild/meson/issues/12338
2024-01-16cmake: Fix blunt target filtering skipping GENERATED dependenciesL. E. Segovia
GENERATED files can be used as dependencies for other targets, so it's misguided (at best) to filter them with a blunt whitelist. However, there does exist an extension that needs to be skipped: on Windows + MSVC, CMake will by default try to generate a Visual Studio project, and there dependencies with no inputs are instead tied to a dummy .rule input file which is created by the generation step. The fileapi will still report those, so it will cause Meson to bail out when it realises there's no such file in the build tree. Fixes #11607
2024-01-15compilers: add c23 and gnu23 c_stdsSimon Ser
Closes: https://github.com/mesonbuild/meson/issues/12702
2024-01-15Add a note for Windows users to GuiTutorial.mdizimuth
When compiling on Windows using MSVC, you also need to link the SDL2main.lib file. I've added a note to the GuiTutorial.md file to mention this.
2024-01-11Vala: fixes to gresource handling (#12418)Valeri
* Vala: depend on gresources Valac uses gresource at compile time to look up .ui files * Automatically pass `--gresourcesdir` to valac * gnome.compile_resources: clean up duplicate paths better * Add a test for improved gresouce handling
2024-01-09compilers: cpp: wire up debugstl for ClangSam James
For Clang, we now pass -D_GLIBCXX_DEBUG=1 if debugstl is enabled, and we also pass -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG. Per https://discourse.llvm.org/t/building-a-program-with-d-libcpp-debug-1-against-a-libc-that-is-not-itself-built-with-that-define/59176/3, we can't use _LIBCPP_DEBUG for older Clang versions as it's unreliable unless libc++ was built with it. We choose MODE_DEBUG for stldebug while building with assertions will do MODE_EXTENSIVE. Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2024-01-09ninja: Use platform dependent quote instead of shlex.quote() in gcc_rsp_quote()byteblob
2024-01-09compilers: cpp: wire up stdlib assertionsSam James
None of the options set here affect ABI and are intended for detecting constraint violations. For GCC, we simply need to set -D_GLIBCXX_ASSERTIONS. For Clang, the situation is far more complicated: * LLVM 18 uses a 'hardened mode' (https://libcxx.llvm.org/Hardening.html). There are several levels of severity available here. I've chosen _LIBCPP_HARDENING_MODE_EXTENSIVE as the strongest-but-one. The strongest one (_DEBUG) doesn't affect ABI still but is reserved for stldebug. * LLVM 15 uses a similar approach to libstdc++ called '_LIBCPP_ENABLE_ASSERTIONS' Note that LLVM 17 while in development had fully deprecated _LIBCPP_ENABLE_ASSERTIONS in favour of hardened, but changed its mind last-minute: https://discourse.llvm.org/t/rfc-hardening-in-libc/73925/4. Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2024-01-08ast/interpreter: fix some low hanging type issuesDylan Baker
2024-01-08ast/introspection: make mypy cleanDylan Baker
2024-01-08ast: mark visitor and preprocessor as mypy safeDylan Baker
They already are warning free
2024-01-08ast/printer: fix mypy issuesDylan Baker
Other than one case that I think cannot be actually hit (or it would fail).
2024-01-06machine file: Fix parenthesized expressionsTamás Bálint Misius
Extends 79ed2415e9a5. Thanks @bruchar1 for the test case; I got absolutely lost trying to figure out where to add one.
2024-01-05Fix warning_level=everything in vs backendsCharles Brunet
Fixes #12688
2024-01-02tests: fix java JNI test assert for jni.h existingEli Schwartz
compiler.has_header() isn't an assert, even though the comments say it is. With `required: true` it is an actual assert.
2024-01-02CI: fix even more brokenness in the macos CIEli Schwartz
Commit 191449f60879a622661b96600babaec67477d5bb has numerous issues, and being completely invalid yml syntax was just the tip of the iceberg. In this case, it fails the github schema, which requires that env be adjunct to a job or step definition, rather than its own thing. It did not even make sense in context, since the purpose of the variable is to modify brew. Fixes: #12644 Fixes: #12681
2024-01-01Fix intellisense errors in genvslite projectsRoger Sanders
Standard include paths need to be added to resolve STL and platform headers. Additionally, compiler args need to be separated by spaces, not semicolons, in order to be recognised.
2024-01-01CI: Fix macos.yml error "Invalid workflow file"Chris Mayo
2024-01-01envconfig: read CYTHON from the environment and use it if setErik Bråthen Solem
Add support for specifying Cython compiler using the CYTHON environment variable. If not set, proceed with the names hard coded for Cython.
2024-01-01docs: Document Qt tools updates in 0.63Chris Mayo
Especially relevant for users of Ubuntu 22.04 which has packages for Qt 6.2 and Meson 0.61. a606ce22e ("Add support for Qt 6.1+", 2022-01-08) d68a0651e ("qt module: also prefer the changed name scheme for the tools", 2022-02-09)
2024-01-01docs: Fix since for compile_translations in _include_qt_baseChris Mayo
2024-01-01docs: Rename Qt4 & Qt5 in Dependencies to QtChris Mayo
2024-01-01docs: Use Qt instead of qtChris Mayo
2023-12-28docs: fix regression that broke intended meaning of compiler variables noteEli Schwartz
In commit 58c2aeb5e433ae7652488d53021c40db1712dea5, an asterisk used to indicate "see note at bottom" was doubled up into an "italicize this paragraph", which didn't contextually make any sense. See: https://github.com/mesonbuild/meson/pull/12674#issue-2057666653
2023-12-27Add CLion to the list of IDE integrationsMarina.Kalashina
CLion was not mentioned in the list of IDE integrations. This commit adds it, also adds a “3rd party" prefix to the Meson Syntax Highlighter plugin to indicate that it doesn't come from JetBrains, and sorts the list alphabetically.