aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-05-13Fix has_function() for clang on 64bit WindowsChristoph Reiter1-1/+1
has_function() tries to link an example program using the function to see if it is available, but with clang on 64bit Windows this example always already failed at the compile step: error: cast from pointer to smaller type 'long' loses information long b = (long) a; This is due to long!=pointer with LLP64 Change from "long" to "long long" which is min 64bit and should always fit a pointer. While "long long" is strictly a C99 feature every non super ancient compiler should still support it.
2020-05-12cmake: Ignore unknown c(pp)? stds (fixes #7104)Daniel Mensinger1-1/+16
2020-05-12interpreterbase: Fix version checking for deprecationDylan Baker1-2/+17
Currently deprecation features use the same logic as new features, but that doesn't work correctly. FeatureNew wants to warn about cases where you claim to support >= 0.40, but use a feature from 0.42; deprecation wants to warn when you claim to support >= 0.50, but use a feature that was replaced in 0.45. To make this work we need to invert the version check in the deprecation function, so that if the deprecation is 0.45, and the supported version is >= 0.50, we get a true not a false.
2020-05-12interpreter: Don't assign duplication and new feature warning to the same ↵Dylan Baker1-3/+12
variable Currently The Deprecated and New features checkers share an attribute through a base class that should be per class. We need to duplicate this and move it into each of the sublcasses Fixes #7080
2020-05-11ConfigToolDependency: Don't fallback to system tool when cross compilingXavier Claessens4-22/+15
The system tool is always the wrong thing to use and cause hard to debug issues when trying to link system libraries with cross built binaries. The ExternalDependency base class already had a method to deal with this, used by PkgConfigDependency and QtBaseDependency, so it should make things more consistent.
2020-05-11Add AVR to cpu families. Closes #7085.Jussi Pakkanen2-0/+2
2020-05-11Fix builtin check in has_function() with GCC 10 on WindowsChristoph Reiter1-11/+16
The builtin check had a special case that if a header was provided and the function wasn't defined, it would ignore the builtin to avoid non-functional builtins (for example __builtin_posix_memalign in MSYS2). GCC 10 gained support for __has_builtin() which now skipps this check and because __has_builtin(__builtin_posix_memalign) returns true the non functional builtin is now reported as available. To get the old behaviour back move the special case in front of the actual availability check. Fixes #7113
2020-05-10python: install_sources() should default to pure, following the docMarc-André Lureau1-1/+1
As stated by the doc, default to install python sources to purelib location, as they should not depend on platform. This also fixes discrepancy between get_install_dir() and install_sources() locations. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2020-05-10Improve Emscripten linker version detectionAndrei Alexeyev1-6/+9
2020-05-10boost: Do not be strict about static if not specified (fixes #7057)Daniel Mensinger1-1/+2
2020-05-08Allow indexed custom target to be used in executable's depends.Szabi Tolnai4-1/+43
Change-Id: I7f3e0e0dd9c413d7f6e3267de9664b89f2294e27
2020-05-08More robust cmake version detectionReza Housseini1-1/+1
2020-05-08Do not pass rpath flags to wasm-ldAndrei Alexeyev1-0/+5
2020-05-08rename unstable-kconfig to unstable-keyvalPaolo Bonzini17-33/+40
Discussions in #6524 have shown that there are various possible uses of the kconfig module and even disagreements in the exact file format between Python-based kconfiglib and the tools in Linux. Instead of trying to reconcile them, just rename the module to something less suggestive and leave any policy to meson.build files. In the future it may be possible to add some kind of parsing through keyword arguments such as bool_true, quoted_strings, etc. and possibly creation of key-value lists too. For now, configuration_data objects provide an easy way to access quoted strings. Note that Kconfig stores false as "absent" so it was already necessary to write "x.has_key('abc')" rather than the more compact "x['abc']". Therefore, having to use configuration_data does not make things much more verbose.
2020-05-07docs/Precompiled-headers: minor spell check. [skip ci]Wenjian He1-1/+1
a give target -> a given target Proposed by #7081 .
2020-05-07Allow overriding g-ir-scanner and g-ir-compiler binaries.James Hilliard1-2/+10
This is useful when one needs to force meson to use wrappers for cross compilation. Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
2020-05-07envconfig: Always honor PKG_CONFIG_PATHDylan Baker1-1/+1
The comment for this code is correct, but the code itself isn't. The way it's implemented in a cross compile we don't look at PKG_CONFIG_PATH at all. Fixes: #7062
2020-05-06Merge pull request #7064 from dcbaker/gtest-protocolJussi Pakkanen10-86/+239
Add support for Gtest as a test protocol
2020-05-06Merge pull request #7076 from mesonbuild/revertcrossfixupJussi Pakkanen4-1/+15
Revert cross fixup
2020-05-04docs/unit-tests: Add information about output filesDylan Baker1-0/+25
2020-05-04docs: Reformat unit-tests to be ~80 characters per lineDylan Baker1-41/+84
2020-05-04Add native support for gtest testsDylan Baker7-20/+78
Gtest can output junit results with a command line switch. We can parse this to get more detailed results than the returncode, and put those in our own Junit output. We basically just throw away the top level 'testsuites' object, then fixup the names of the tests, and shove that into our junit.
2020-05-04coredata: init IntegerOption choices to the correct valueEric Engestrom1-3/+3
It's not a boolean, so let's avoid initializing it to invalid choices followed by assigning it valid ones.
2020-05-04Add regression test for libdir reset.Jussi Pakkanen3-0/+14
2020-05-04Revert "coredata: init_builtins should always call libdir_cross_fixup"Jussi Pakkanen1-1/+1
This reverts commit cc4e9e79be54f59a09d8e5ca96c6a2946245a88d.
2020-05-04Fix incremental debug builds in VSGustavoLCR2-2/+3
2020-05-03Merge pull request #7060 from dcbaker/install-script-targetsJussi Pakkanen14-22/+217
Allow meson.add_*_script to take additional types
2020-05-03Merge pull request #7059 from xclaesse/gir-windowsJussi Pakkanen2-2/+10
Fix gir on Windows
2020-05-03rm python2 %s from backends.py and ninjabackend.pyMichael Brockus2-38/+35
2020-05-03boost: Do not set BOOST_ALL_DYN_LINK (fixes #7056)Daniel Mensinger1-5/+2
2020-05-02Merge pull request #6838 from dcbaker/link-language-in-librariesJussi Pakkanen9-8/+82
Link language in libraries
2020-05-01docs/Users: add Vala Language ServerPrinceton Ferro1-0/+1
See https://github.com/benwaffle/vala-language-server
2020-05-01boost: Only use usage-requirements defines (fixes #7046)Daniel Mensinger3-58/+93
2020-05-01Document formal Meson grammar [skip ci]Flow-It1-0/+70
* WIP: Document formal Meson grammar * Various little fixes [skip ci] 1) Add missing logical_not_expr 2) 'in' and 'not in' are valid relational operators at least for dicts 3) dictionary keys can be expressions, but kwarg names cannot 4) typo logical_end_expression -> logical_and_expression 5) Make jump statements only allowed inside an iteration statement * Rework EBNF style [skip ci] As there is no good order for the productions, just go alphabetically. The EBNF style was changed to match the one the Python lark project uses, that is colons for productions and terminals enclosed in double quotes. * Add missing production for unary operators [skip ci] * Add production for multiline strings [skip ci] * Properly define terminal symbols [skip ci] Depending on the EBNF flavor, regex can be used to describe the terminal symbols. Lark allows this, and as it was mentioned as a possible user of this grammar, let's follow its flavor here. Most regexes used are easily human-readable, and we can always add comments to more complicated ones. * Small changes to which expressions can be used where [skip ci] Let the grammar be very general. The type system then has to check, that the used expression really evaluates to the correct type. Even if we know today that assignment expressions always evaluate to None (and can therefore only be used as a toplevel expression in an expression statement), this needn't be the case forever. So this way, the grammar stays stable even if such changes were made. * Rework function argument list production [skip ci] * Be more verbose for production names [skip ci] Rename expr -> expression, stmt -> statement, op -> operator, program -> build_definition. Also adjust some list productions. * Add paragraph about syntax stability promises [skip ci]
2020-04-30backend/backends: Fix type annotationDylan Baker1-1/+1
2020-04-30Convert test protocol into an enumDylan Baker4-8/+32
This gives us better type safety, and will be important as we add more test methods
2020-04-30build: cleanup and sort importsDylan Baker1-3/+5
2020-04-30backends/backends: sort and cleanup importsDylan Baker1-10/+14
2020-04-30mtest: use argparse.type to simplify some codeDylan Baker1-2/+1
2020-04-30mtest: Replace if (bool) { return bool; } with return bool;Dylan Baker1-3/+1
2020-04-30Allow get_variable to still function when the fallback is a disabler.James Hilliard3-1/+31
2020-04-30Update test.json schema to add stdoutJon Turney2-3/+28
Update the test.json schema, adding the 'stdout' property. Also amend the test.json schema so the presence of an unexpected property on the root object causes a validation error. v2: Also add 'tools' property to json schema. Amend the documentation not to use the word 'list' to describe a dict.
2020-04-30Update dircondenser.py tool to update paths in test.json as wellJon Turney1-0/+4
Update dircondenser.py tool to update paths appearing in the expected stdout in test.json when the containing directory is renamed.
2020-04-30Add expected stdout for failing-meson and warning-meson testsJon Turney97-10/+722
Initially produced using: for d in "test cases/failing/"* ; do rm -r _build ; ./meson.py setup "$d" _build | grep ERROR >"$d"/expected_stdout.txt; done then converted to json with jq using: jq --raw-input --slurp 'split("\n") | {stdout: map({line: select(. != "")})}' expected_stdout.txt >test.json or merged with existing json using: jq --slurp '.[0] + .[1]' test.json expected.json >test.json.new v2: Add some comments to explain the match when it isn't totally obvious v3: Add or adjust existing re: in expected output to handle '/' or '\' path separators appearing in message, not location. v4: Put expected stdout in test.json, rather than a separate expected_stdout.txt file Park comments in an unused 'comments' key, as JSON doesn't have a syntax for comments
2020-04-30Add a mechanism for validating meson output in testsJon Turney2-0/+80
Expected stdout lines must match lines from the actual stdout, in the same order. Lines with match type 're' are regex matched. v2: Ignore comment lines in expected_stdout v3: Automatically adjust path separators for location in expected output v4: Put expected stdout in test.json, rather than a separate file
2020-04-30Cosmetic tweak to error message for incdir() with an absolute pathJon Turney1-2/+3
Cosmetic tweak to the error message for incdir() with an absolute path. Don't split the message in the middle of a sentence at a point which may or may not correspond to the terminal width.
2020-04-30Check before compiler detection if 'c' language is present when adding 'vala'Jon Turney1-5/+6
For the sake of a consistent error message (irrespective of if 'valac' is present or not), check if the 'c' language is present if we are adding 'vala' before (rather than after) we do compiler detection.
2020-04-30Be more careful about the use of repr() in error messagesJon Turney3-4/+7
Generally, we'd want to use str() rather than repr() in error messages anyhow, as that explicitly gives something designed to be read by humans. Sometimes {!r} is being used as a shortcut to avoid writing the quotes in '{!s}'. Unfortunately, these things aren't quite the same, as the repr of a string containing '\' (the path separator on Windows) will have those escaped. We don't have a good string representation to use for the arbitrary internal object used as an argument for install_data() when it's neither a string nor file (which doesn't lead to a good error message), so drop that for the moment.
2020-04-30Skip failing tests when they won't fail in the expected wayJon Turney14-11/+60
2020-04-30Make colourize_console() a functionJon Turney3-13/+30
Currently, colourize_console is a constant, set at process initialization. To allow the actual stdout to be easily compared with the expected when running tests, we want to allow colourization to be on for the test driver, but not for the in-process configure done by run_configure, which has stdout redirected from a tty to a pipe. v2: Cache _colorize_console per file object v3: Reset cache on setup_console()