aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
AgeCommit message (Collapse)AuthorFilesLines
2020-09-11Store first line of VisualStudio compiler output as full_versionJon Turney1-1/+1
Store the first line of VisualStudio compiler output as full_version, so it gets output when we report compiler details.
2020-09-11Revert "Do not automatically set warning flags if buildtype is 'plain'"Eli Schwartz1-1/+1
This reverts commit 8ee1c9a07a3a35e3ed262fbc358fd86c257a966e. No rationale was given for this change prior to merging. After the fact it was described as desired by distro packagers, however as a distro packager I believe this commit hurts me. From a distro packaging perspective, we primarily care about one thing: previously building code should still build. Hence, -Werror is bad for our use case. meson handles this via -D werror which is different from -D warning_level and as long as the former is disabled, warnings in the build do not cause harm (but may attract review attention for upstream to fix). buildtype is a completely unrelated concern, and the intention for =plain is to disable debug or optimization settings that result in codegen differences and thus different built artifacts. This must not happen in distro builds because the *distributed programs* should conform to policy settings. Unfortunately, completely disabling warnings happens silently, and cannot be overridden even if you really, really believe you know what you're doing. It is thematically broken, since use of add_project_arguments() to add more -W flags is not likewise ignored. But if you try to add -Wall in that manner, meson will lecture you to use warning_level which you cannot do. And if you have custom warning flags which depend on options enabled by judicious use of -Wall via default_options: 'warning_level=1', then you end up with generated warnings complaining about your command line rather than your code, such as: cc1: warning: ‘-Wformat-y2k’ ignored without ‘-Wformat’ [-Wformat-y2k] cc1: warning: ‘-Wformat-extra-args’ ignored without ‘-Wformat’ [-Wformat-extra-args] cc1: warning: ‘-Wformat-zero-length’ ignored without ‘-Wformat’ [-Wformat-zero-length] cc1: warning: ‘-Wformat-contains-nul’ ignored without ‘-Wformat’ [-Wformat-contains-nul] cc1: warning: ‘-Wformat-security’ ignored without ‘-Wformat’ [-Wformat-security] which then break the build with -Werror. Throughout all this, a buildtype of "plain" does *not* disable -D werror=true, which is the part where distro builds actually break down! Users who both wish to disable debug/optimization codegen, *and* disable warning commentary, are encouraged to do so by doing both, not by doing one and having the other be assumed. Fixes #7399
2020-09-10msubprojects: Allow comma separated list of typesXavier Claessens2-6/+13
2020-09-10msubprojects: Fix review commentsXavier Claessens1-2/+8
2020-09-10git: Use Popen_safe to avoid encoding issuesXavier Claessens2-44/+48
2020-09-10Move verbose_git() and quiet_git() to mesonlibXavier Claessens2-18/+17
2020-09-10mesonlib: Move MesonException declaration to the topXavier Claessens1-13/+11
2020-09-10msubprojects: Rework update commandXavier Claessens1-52/+96
Besides refactoring code into smaller functions: - Makes the --rebase behaviour the default for consistency: it was already rebasing when current branch and revision are the same, it is less confusing to rebase when they are different too. - Add --reset mode that checkout the new branch and hard reset that branch to remote commit. This new mode guarantees that every subproject are exactly at the wrap's revision. - Local changes are always stashed first to avoid any data loss. In the worst case scenario the user can always check reflog and stash list to rollback. Fixes: #7526
2020-09-10msubprojects: Return failure if some commands failedXavier Claessens1-23/+39
If the command fails on some subprojects continue with the rest but return non-0 code. This is useful for CI scripts to ensure it tests latest code instead of old cached code in case of network error or something.
2020-09-10msubprojects: Stash changes before checkoutXavier Claessens1-0/+3
2020-09-10msubprojects: Support git subprojects with no wrap fileXavier Claessens2-0/+19
User could have cloned manually a subproject.
2020-09-10msubprojects: Use less cryptic "git branch --show-current" commandXavier Claessens1-3/+3
It describes well what it does, compared to obscure "rev-parse".
2020-09-10msubprojects: Add --type argumentXavier Claessens1-0/+5
It is often desired to only update git repositories and not pull files from wrapdb.
2020-09-10msubprojects: Use wrap.Resolver() to load all PackageDefinitionXavier Claessens1-21/+16
Besides being simpler, it has the advantage of picking directories that don't have a .wrap file assotiated.
2020-09-10minstall: Add version field to install dataNirbheek Chauhan3-9/+17
And check the install data in the same way that mtest checks serialisation data. Fixes https://github.com/mesonbuild/meson/issues/2354
2020-09-10mtest: Refactor test data checkingNirbheek Chauhan1-21/+12
2020-09-10mtest: Check version in the test data after loadingNirbheek Chauhan3-16/+34
Same as coredata.dat and build.dat loading. Also, do not assert if things change. Raise the appropriate exception. Fixes https://github.com/mesonbuild/meson/issues/7613
2020-09-10Identify machine in error accesing compiler object for missing languageJon Turney1-1/+1
Also add a failing test case for that error.
2020-09-10ninja: Generate all STATIC_LINKER rulesJon Turney1-2/+5
Don't stop generating STATIC_LINKER rules at the first MachineChoice which isn't available (i.e. generate a STATIC_LINKER rule, even if STATIC_LINKER_FOR_BUILD isn't needed) Also warn about internal errors which lead to non-existent rule references, rather than exploding with a KeyError.
2020-09-10Don't require build machine compilers for project() languagesJon Turney1-1/+3
This means that, in the common case of a simple meson.build which doesn't contain any 'native: true' targets, we won't require a native compiler when cross-compiling, without needing any changes in the meson.build.
2020-09-10cmake: fix shared_module dependency (fixes #7715)Daniel Mensinger1-0/+4
2020-09-09Merge pull request #7657 from mensinda/moreTypingDylan Baker70-607/+718
typing: Strict type annotations
2020-09-09Merge pull request #7428 from jon-turney/introspector-add-languagesJussi Pakkanen1-12/+21
Handle add_languages(native:) in introspector
2020-09-09Implement add_languages(native:) in introspectorJon Turney1-2/+7
2020-09-08typing: fixup for #7708Daniel Mensinger1-1/+5
2020-09-08typing: fixup of #7688Daniel Mensinger1-1/+1
This bug not beeing caught in review is another reason for adding strict typing support to meson.
2020-09-08typing: Fix code reviewDaniel Mensinger3-37/+12
2020-09-08typing: fix LGTM bot errorDaniel Mensinger1-0/+4
2020-09-08typing: fix code reviewDaniel Mensinger10-38/+39
2020-09-08typing: get rid of most T.castDaniel Mensinger7-16/+21
2020-09-08typing: more fixesDaniel Mensinger18-161/+214
2020-09-08typing: Fix templatesDaniel Mensinger13-24/+28
2020-09-08typing: fix dependencies for new follow_importsDaniel Mensinger4-15/+18
2020-09-08typing: fix envconfig typingDaniel Mensinger1-1/+1
2020-09-08typing: ignore error because of untyped decoratorDaniel Mensinger1-1/+1
2020-09-08typing: fully annotate mintro and mtestDaniel Mensinger2-25/+25
2020-09-08typing: fully annotate mcompile, minit, and msetupDaniel Mensinger3-15/+19
2020-09-08typing: fully annotate fs moduleDaniel Mensinger1-4/+4
2020-09-08typing: fully annotate arglistDaniel Mensinger2-5/+5
2020-09-08typing: fully annotate boost and hdf5 depsDaniel Mensinger2-8/+12
2020-09-08typing: fully annotate scriptsDaniel Mensinger22-152/+182
2020-09-08typing: fully annotate wrapDaniel Mensinger3-34/+40
2020-09-08typing: fully annotate mparser.pyDaniel Mensinger2-18/+29
2020-09-08typing: fully annotate mesonlib.pyDaniel Mensinger2-42/+42
2020-09-08typing: Add run_mypy.py for easier mypy invocationDaniel Mensinger1-1/+1
2020-09-08typing: completely type interpreterbaseDaniel Mensinger1-64/+68
2020-09-08typing: completely type astDaniel Mensinger3-7/+7
2020-09-08typing: refactor dict handlingDaniel Mensinger2-25/+28
2020-09-08IntrospectInterpreter: allow dictionaries with nonconstant keysPaolo Bonzini1-0/+10
Something like {a: foo} currently stymies the IntrospectionInterpreter and breaks introspection of the source directory. The fix is just to walk the keys and return a dummy dictionary. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-08Factor out an _add_languages() function in introspectorJon Turney1-11/+15
Factor out an _add_languages() function in introspector, rather than calling func_add_languages() with arguments crafted to fake an interpreter call.