aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-01-27Can read project version from a file.versionfromfileJussi Pakkanen6-6/+41
2021-01-27custom_target: Add env kwargXavier Claessens10-9/+37
2021-01-27test: Make timeout <= 0 infinite duractionXavier Claessens4-10/+28
2021-01-26dist: Use windows_proof_rmtree() instead of shutil.rmtree()Xavier Claessens1-4/+4
2021-01-26dist: Allow packaging subproject in same git repo as main projectXavier Claessens4-21/+107
2021-01-26do not require git installed in order to use wrapsEli Schwartz1-1/+3
It doesn't make sense to check for the presence of git every time we use it, but short-circuit any attempt to use a wrap right from the get-go because we are trying to be fancy with submodules. If git is not installed, simply do not try to figure out whether the wrap is a submodule that can potentially be checked out/updated for the user. Just take it on faith that it isn't one. Fixes #2623
2021-01-26docs: Fix sentence in Machine-files.md [skip ci]Florian Schmaus1-1/+1
Fixes: 1ca17dc853ec ("docs/machine-files: Add a section on data types")
2021-01-26Warn about .C and .H files (#8249)Volker-Weissmann1-0/+7
2021-01-25Merge pull request #8236 from ↵Jussi Pakkanen5-4/+31
dcbaker/submit/rust-fix-generated-sources-in-subdir Submit/rust fix generated sources in subdir
2021-01-25Add ARM64EC as a new conceptual cpu type of arm64Ben Niu1-1/+7
ARM64EC is a new ARM64 ABI made by Microsoft. The ARM64EC binaries can be loaded in x64 processes on the latest Windows Insider Preview on ARM64, and they don't need to be emulated for the sake of performance. To support the ARM64EC build target, a new conceptual arm64 cpu type 'arm64ec' is added. The cpu can be specified in cross files like below to generate msbuild solution/vcxproj files with platform set to ARM64EC. [target_machine] system = 'windows' cpu_family = 'aarch64' cpu = 'arm64ec' endian = 'little'
2021-01-23Merge pull request #8226 from jonaslb/fortranstaticJussi Pakkanen9-13/+94
Fixes for fortran: Include dirs for link_whole_targets and capital file suffix
2021-01-23docs: Fix typo in Syntax.md [skip ci]Evgeny Ermakov1-1/+1
2021-01-23split mesonlib into a packageDylan Baker14-63/+281
Currently mesonlib does some import tricks to figure out whether it needs to use windows or posix specific functions. This is a little hacky, but works fine. However, the way the typing stubs are implemented for the msvcrt and fnctl modules will cause mypy to fail on the other platform, since the functions are not implemented. To aleviate this (and for slightly cleaner design), I've split mesonlib into a pacakge with three modules. A universal module contains all of the platform agnositc code, a win32 module contains window specific code, a posix module contains the posix specific code, and a platform module contains no-op implementations. Then the package's __init__ file imports all of the universal functions and all of the functions from the approriate platform module, or the no-op versions as fallbacks. This makes mypy happy, and avoids `if`ing all over the code to switch between the platform specific code.
2021-01-21tests/rust: Add a generated library to generated main testDylan Baker4-1/+19
Which is broken, of course.
2021-01-21ninjabackend: Correctly reference custom_target outputs in subdirs with rustDylan Baker1-1/+1
This was missed in the last iteration of fixing things.
2021-01-21tests/rust: Add subdir to generated sources testDylan Baker2-2/+11
2021-01-21interpreter: accept external programs and dependencies for summaryPaolo Bonzini7-8/+60
2021-01-21mlog: add __len__ to AnsiDecoratorPaolo Bonzini2-9/+4
2021-01-21mlog: add __str__ method to AnsiDecoratorPaolo Bonzini3-19/+7
Automatically colorize the text when printing the AnsiDecorator, based on the result of mlog.colorize_console(). This is how AnsiDecorator is used most of the time anyway.
2021-01-21Add fortran test with an install:yes static libraryJonas Lundholm Bertelsen6-0/+74
This adds a test which makes use of an install:yes static library that depends on another static library. This triggers a promotion to link_whole_target inside meson which takes different code paths in certain places. Also makes use of .F90 source (capital F) to test for case (in)sensitivity.
2021-01-21Unity build reverts to normal for fortran fixJonas Lundholm Bertelsen2-7/+10
The `determine_ext_objs` function did not take into account that fortran (and d) does not support unity builds. This caused failures in some cases.
2021-01-20external_project: Log configure commandXavier Claessens1-0/+4
2021-01-20MSVC and Clang-Cl Compiler Argument CleanupMarios Staikopoulos2-27/+22
This commit performs some cleanup for the msvc and clang-cl arguments. * "Disable Debug" (`/Od`) is no longer manually specified for optimization levels {`0`,`g`} (it is already the default for MSVC). * "Run Time Checking" (`/RTC1`) removed from `debug` buildtype by default * Clang-CL `debug` buildtype arguments now match MSVC arguments * There is now no difference between `buildtype` flags and `debug` + `optimization` flags
2021-01-20Avoid accidental use of STANDALONE_WASM mode on compiler testsBrion Vibber1-1/+1
Compiler tests, such as checking for atomics support, could fail when compiling to WebAssembly multithreaded targets because the compiler tests got compiled to 'output.wasm'. Using the '.wasm' suffix in recent versions of emscripten engages STANDALONE_WASM mode, which disables features that require a JS runtime like shared memory. This created false negatives on support of those features when building a library to be linked into an executable that is not in STANDALONE_WASM mode. Changing these to 'output.o' will continue to produce WebAssembly object files, but they will no longer be configured for standalone runtime mode.
2021-01-20Added "How do I use a library before declaring it?" in the FAQ.Volker Weißmann1-0/+17
2021-01-20Merge pull request #8225 from bonzini/mtest-asyncio-cleanupsJussi Pakkanen1-151/+232
mtest: cleanups and bugfixes
2021-01-20unittests: Remove double install for case 10Fini Jastrow1-5/+2
[why] In test case 10 the project is installed twice. This has been introduced with commit 55abe16 unit tests: Test that relative install_rpath works correctly where the cxx tests where added by copy and paste. [how] First test all build rpaths, then after install all install rpaths. [note] The aforementioned commit is a bit strange in that it adds a tests with a relative rpath with cxx files but not with c files. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2021-01-20ninjabackend: Correct RPATH orderFini Jastrow8-19/+86
[why] If we build and test a library we need to make sure that we find the currently build library object first, before an older system installed one. This can be broken if the library in question is installed in a custom path, and another library we depend on also is installed there. [how] Just move the rpath to the current build artifacts to the front. Solves #8030. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2021-01-20Merge pull request #8158 from dcbaker/submit/rust-generated-mainJussi Pakkanen5-22/+70
rust: Accept generated sources for main.rs
2021-01-20When iterating link_targets, include link_whole_targets too (fortran)Jonas Lundholm Bertelsen2-2/+6
This fixes fortran includes and fortran orderdeps for libraries that were under link_whole_targets.
2021-01-20Use case-insensitive suffix check for fortranJonas Lundholm Bertelsen2-4/+4
In Fortran it is common to use capital F in the suffix (eg. '.F90') if the source file makes use of preprocessor statements. Such files should probably be treated like all other fortran files by meson. Case insensitivity for suffixes was already implemented several places in meson before this. So most likely, the few places changed here were oversights anyway.
2021-01-20mtest: collect stdout/stderr even in verbose modePaolo Bonzini1-14/+27
Using verbose mode dropped stdout/stderr from the logs, because it was not captured. Now that we can easily stick code in the middle of the reading of stdout/stderr, use that to print stdout and stderr on the fly while also capturing them for the logs. The output is line-buffered. As a side effect, this also fixes a possible deadlock due to not using ensure_future around stdo_task and stde_task. In particular: - the stdo_task coroutine would not terminate until the test closed stdo_task - the stde_task coroutine would not start until the stdo_task coroutine finished Therefore, the test could get stuck waiting for its parent to read the contents of stderr, but that would not happen because Meson was still in the stdo_task coroutine.
2021-01-19Keep buildtype the same even if user changes debug and/or optimization.Jussi Pakkanen5-60/+86
2021-01-19backend/ninja: Add order dependencies for generated sources in rustDylan Baker1-2/+5
2021-01-19rust: Accept generated sources for main.rsDylan Baker4-8/+60
There are still caveats here. Rust/cargo handles generated sources by writing out all targets of a single repo into a single output directory, setting a path to that via a build-time environment variable, and then include those files via a set of functions and macros. Meson's build layout is naturally different, and ninja makes working with environment variables at compile time difficult. Fixes #8157
2021-01-19Replace NinjaBackend is_rust_target with build.uses_rustDylan Baker3-12/+5
we have two functions to do the exact same thing, and they're basically implemented the same way. Instead, let's just use the BuildTarget one, as it's more generally available.
2021-01-18Fix cases where text leaks to stdout in unit tests.Jussi Pakkanen1-2/+2
2021-01-17Do not store config parser object in Wrap object. Closes: #7920.Jussi Pakkanen1-11/+11
2021-01-17Removal of /ZI on MSVC DebugMarios Staikopoulos3-6/+21
The /ZI flag adds in "Edit and Continue" debug information, which will cause massive slowdown. It is not a flag that we should be adding by default to debug builds. /Zi will still be added.
2021-01-17external_project: Write output in log files when not verboseXavier Claessens1-2/+7
2021-01-15mtest: move I/O handling to TestSubprocessPaolo Bonzini1-36/+44
Move the logic to start the read/decode tasks to TestSubprocess and keep SingleTestRunner simple. The lines() inner function is tweaked to produce stdout as a future. This removes the nonlocal access (which is not possible anymore when the code is moved out of _run_cmd), and also lets _run_cmd use "await stdo_task" for both parsed and unparsed output.
2021-01-15mtest: tweak the gathering of stdo_task/stde_task resultsPaolo Bonzini1-9/+14
After the next patch, we will need to complete parse_task before stdo_task (because parse_task will not set the "stdo" variable anymore but it will still collect stdout just like now). Do the change now to isolate the more complicated changes.
2021-01-15mtest: disable the progress report in gdb modePaolo Bonzini1-3/+5
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-15mtest: introduce ConsoleUserPaolo Bonzini1-2/+22
This new enum can be used by TestSubprocess and TestHarness to understand (at a higher level) how SingleTestRunner sets up stdout/stderr redirection.
2021-01-15mtest: turn TestRun into a hierarchyPaolo Bonzini1-91/+128
Make SimpleTestRunner oblivious of the various test protocols. All the different "complete_*" and "parse_*" methods move to the subclasses of TestRun.
2021-01-15mtest: pass command line to TestRun.startPaolo Bonzini1-18/+16
The command line is already available when the test is started. Pass it to TestRun.start instead of TestRun.complete*.
2021-01-15mtest: add complete_skip to TestRunPaolo Bonzini1-1/+4
2021-01-15mtest: simplify complete_exitcodePaolo Bonzini1-8/+5
There is no need anymore to pass the JUnit XML down to complete_exitcode. Just set self.junit in complete_gtest instead.
2021-01-15mtest: store the environment in the TestRunPaolo Bonzini1-1/+1
The test_env was lost from the TestRun object in commit 30741a0f2 ("mtest: create TestRun object early on"). Fix things.
2021-01-15mtest: do not print time out message twicePaolo Bonzini1-2/+0
Rebase mistake in "mtest: move timeout message to ConsoleLogger".