summaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
Commit message (Collapse)AuthorAgeFilesLines
...
* custom targets: Add a 'console' kwarg for long-running commandsNirbheek Chauhan2018-07-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | Ninja buffers all commands and prints them only after they are complete. Because of this, long-running commands such as `cargo build` show no output at all and it's impossible to know if the command is merely taking too long or is stuck somewhere. To cater to such use-cases, Ninja has a 'pool' with depth 1 called 'console', and all processes in this pool have the following properties: 1. stdout is connected to the program, so output can be seen in real-time 2. The output of all other commands is buffered and displayed after a command in this pool finishes running 3. Commands in this pool are executed serially (normal commands continue to run in the background) This feature is available since Ninja v1.5 https://ninja-build.org/manual.html#_the_literal_console_literal_pool
* Merge pull request #3850 from mesonbuild/nirbheek/exe-wrapper-compiler-fallbacksJussi Pakkanen2018-07-311-3/+1
|\ | | | | Be more permissive about not-found exe_wrapper
| * cross: Use ExternalProgram for cross-file exe_wrapperNirbheek Chauhan2018-07-091-3/+1
| | | | | | | | | | | | We already have code to fetch and find binaries specified in a cross file, so use the same code for exe_wrapper. This allows us to handle the same corner-cases that were fixed for other cross binaries.
* | Add a feature-new entry for UserFeatureOptionNirbheek Chauhan2018-07-251-5/+6
| | | | | | | | | | Since we can't detect it in meson_options.txt, detect it when the option is used.
* | Merge pull request #3893 from FFY00/masterJussi Pakkanen2018-07-211-0/+6
|\ \ | | | | | | Add dlang module (dub support)
| * | dependencies: add dub as a dependency methodFFY002018-06-171-0/+6
| | |
* | | Merge pull request #3814 from behlec/configure-file-outputJussi Pakkanen2018-07-191-0/+9
|\ \ \ | | | | | | | | Check if calls to configure_file write to the same output file.
| * | | Use mlog.bold to add quotesChristoph Behle2018-07-081-1/+1
| | | |
| * | | Simplified and cleaned up warning.Christoph Behle2018-07-081-4/+4
| | | |
| * | | Consider subdir for output files.Christoph Behle2018-07-071-3/+7
| | | | | | | | | | | | | | | | | | | | Files will only clash if in the same subdir. Print the subdir in the warning.
| * | | Track line numbers for configure_file.Christoph Behle2018-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | Track line numbers of calls. Warning reports now the line number of the first and the current write to the same file.
| * | | Add warning if configure_file overwrites output.Christoph Behle2018-07-071-0/+5
| | |/ | |/| | | | | | | | | | Record the output for each call to configure_file. If a previous output is overwritten print a warning.
* | | Add missing method on external library object: type_name() (#3845)Nirbheek Chauhan2018-07-081-0/+6
|/ / | | | | | | | | | | For some reason this was missing, but it should've always existed since cc.find_library() returns an object that is internally an ExternalDependency instance.
* | Print a more usable message when a subproject fails to configureNirbheek Chauhan2018-07-071-3/+9
| | | | | | | | | | | | | | Instead of just printing the message in the exception, if it's a MesonException, also print the file and the line number. If it's an unknown exception, print the entire traceback so that we can pin-point what the Meson bug causing it is.
* | Raise a MesonException when substituting an invalid valueNirbheek Chauhan2018-07-071-2/+8
| | | | | | | | Avoids throwing a traceback. Also, warn when setting such a value.
* | Add new method: mlog.deprecation()Nirbheek Chauhan2018-07-071-2/+1
| | | | | | | | Instead of constructing it manually, use a helper.
* | mlog: Add built-in support for quoting bolded messagesNirbheek Chauhan2018-07-061-20/+22
| | | | | | | | | | This allows us to drop wonky sep='' hacks and manual addition of spaces across the codebase.
* | configure_file: Don't optimize away substitutionsNirbheek Chauhan2018-07-041-18/+10
| | | | | | | | | | | | | | | | | | | | | | It's possible that the configuration data object has components added conditionally, and that sometimes an empty configuration data object is passed on purpose. Instead, we do the substitution and also warn if no tokens were found that could've been substituted. Closes https://github.com/mesonbuild/meson/issues/3826
* | Contributing.md: Document procedure for new features [skip ci]Nirbheek Chauhan2018-07-021-1/+1
| |
* | FeatureNew: Make all checks subproject-specificNirbheek Chauhan2018-07-021-34/+54
| | | | | | | | | | | | | | | | | | | | | | | | We now pass the current subproject to every FeatureNew and FeatureDeprecated call. This requires a bunch of rework to: 1. Ensure that we have access to the subproject in the list of arguments when used as a decorator (see _get_callee_args). 2. Pass the subproject to .use() when it's called manually. 3. We also can't do feature checks for new features in meson_options.txt because that's parsed before we know the meson_version from project()
* | interpreter: Use is_subproject() everywhereNirbheek Chauhan2018-07-021-3/+3
| |
* | FeatureNew: Fix method names for some feature checksNirbheek Chauhan2018-07-021-10/+10
| |
* | Various bug fixes for FeatureNewSalamandar2018-07-021-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use _get_callee_args to unwrap function call arguments, needed for module functions. * Move some FeatureNewKwargs from build.py to interpreter.py * Print a summary for featurenew only if conflicts were found. The summary now only prints conflicting features. * Report and store featurenew/featuredeprecated only once * Fix version comparison: use le/ge and resize arrays to not fail on '0.47.0>=0.47' Closes https://github.com/mesonbuild/meson/issues/3660
* | Proper error message for non-found exe in run_target. Closes #3818Jussi Pakkanen2018-07-011-0/+2
| |
* | Add a helper for fetching of binaries from cross filesNirbheek Chauhan2018-07-011-11/+6
| | | | | | | | | | | | | | | | | | | | A number of cases have to be taken care of while doing this, so refactor it into a helper on ExternalProgram and use it everywhere. 1. Command is a list of len > 1, use it as-is 2. Command is a list of len == 1 (or a string), use as a string 3. If command is an absolute path, use it as-is 4. If command is not an absolute path, search for it
* | Allow command lists for find_program cross file overridesNirbheek Chauhan2018-07-011-2/+6
| | | | | | | | | | | | | | | | This is accepted by all other binaries in the cross file. With this change, we also don't check whether the specified command exists at configure time, but that's probably a feature anyway. Fixes https://github.com/mesonbuild/meson/issues/3737
* | Improve logging when dependency is anonymousJon Turney2018-06-301-8/+10
| | | | | | | | | | Various pieces of logging assume the dependency has a name, and aren't grammatical if the dependency is '', so say it is anonymous instead.
* | More tests to cover missing fallback for a non-found dependencyJon Turney2018-06-301-1/+3
| | | | | | | | | | Fix logic so we correctly raise an exception about missing fallback in the case where the dependency is required.
* | Fix handling of dependency('', fallback: ['subproject', 'dep'])Jon Turney2018-06-301-8/+8
| | | | | | | | Also extend a test case to cover this.
* | Warn if using Clang+asan+b_lundef. Closes #764.Jussi Pakkanen2018-06-301-0/+19
| |
* | Print default option values that don't match the current valueNiklas Claesson2018-06-211-2/+16
| |
* | Rename clike_langs to clink_langs for clarityNirbheek Chauhan2018-06-201-2/+2
| | | | | | | | | | | | | | D is not a 'c-like' language, but it can link to C libraries. The same might be true of Rust in the future and Go when we add support for it. This contains no functionality changes.
* | Make a custom target output dir as an include dir relative to @BUILD_ROOT@Jon Turney2018-06-181-1/+1
| | | | | | | | | | | | Make a custom target output dir as an include dir relative to @BUILD_ROOT@, so that path is constructed correctly when using the absolute path forms used by the MSVC backend.
* | Make depends: of windows.compile_resources() include-ableJon Turney2018-06-181-0/+4
| | | | | | | | | | Add the output directories for any custom target in depends: to the resource compiler include path
* | run_command: Add new kwarg 'capture'Nirbheek Chauhan2018-06-181-8/+17
| | | | | | | | | | | | capture: false means we won't try to read the stdout at all. Closes https://github.com/mesonbuild/meson/issues/3364
* | Deprecate `build_always`, add `build_always_stale`Alex Hirsch2018-06-181-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since `build_always` also adds a target to the set of default targets, this option is marked deprecated in favour of the new option `build_always_stale`. `build_always_stale` *only* marks the target to be always considered out of date, but does *not* add it to the set of default targets. The old behaviour can still be achieved by combining `build_always_stale` with `build_by_default`. fixes #1942
* | Add check for arguments of has_members.Christoph Behle2018-06-181-0/+2
| | | | | | | | Ensure that has_members has at least two arguments.
* | Use stub to report misuse of get_defineChristoph Behle2018-06-181-4/+1
| | | | | | | | | | Instead of checking on the call site add a stub to Compiler which raises an exception.
* | Test if compiler supports get_define.Christoph Behle2018-06-181-1/+4
| | | | | | | | | | Raise an InterpreterError for a clean error message if get_define is not supported by the compiler.
* | Add UserFeatureOption typeXavier Claessens2018-06-181-25/+103
|/ | | | | | | | | | | This is a special type of option to be passed to most 'required' keyword arguments. It adds a 3rd state to the traditional boolean value to cause those methods to always return not-found even if the dependency could be found. Since integrators doesn't want enabled features to be a surprise there is a global option "auto_features" to enable or disable all automatic features.
* Always apply concatenate_string_literal.Christoph Behle2018-06-121-4/+0
| | | | | get_define always applies concatenate_string_literal to its result. Remove kwarg concatenate_string_literal from get_define.
* get_define can concatenate string literals.Christoph Behle2018-06-121-0/+4
| | | | | | | Added method concatenate_string_literals to CCompiler. Will concatenate string literals. Added keyword argument 'concatenate_string_literals' to Compiler.get_define. If used will apply concatenate_string_literals to its return value.
* configure_file: Add 'encoding' to FeatureNewNirbheek Chauhan2018-06-101-1/+1
|
* Add file encoding to configure_fileSander Sweers2018-06-091-3/+6
| | | | | | Input files can be in any file encoding, not just utf-8 or isolatin1. Meson should not make assumptions here and allow for the user to specify the encoding to use.
* Fix options being reset to default on reconfigureXavier Claessens2018-06-091-4/+14
| | | | Closes: #3712
* Interpreter: Fix subdir_done() to exit from inside if/foreach blocksXavier Claessens2018-06-071-1/+4
| | | | Closes: #3700.
* Convert args.projectoptions into a dictXavier Claessens2018-06-061-80/+62
| | | | | | | | | | | | | | | | | This simplifies a lot of code, and centralize "key=value" parsing in a single place. Unknown command line options becomes an hard error instead of merely printing warning message. It has been warning it would become an hard error for a while now. This has exceptions though, any unknown option starting with "<lang>_" or "b_" are ignored because they depend on which languages gets added and which compiler gets selected. Also any option for unknown subproject are ignored because they depend on which subproject actually gets built. Also write more command line parsing tests. "19 bad command line options" is removed because bad cmd line option became hard error and it's covered with new tests in "30 command line".
* coredata: Stop setting default option values as argparse attributeXavier Claessens2018-06-061-12/+11
| | | | | | | | | | All options are now the projectoptions list, regardless of how they got defined in the command line. This also delays setting builtin option values until the main project() default options are parsed to simplify the code. This is possible because we already delayed setting the backend after parsing main project() in a previous commit.
* Move to coredata some methods handling optionsXavier Claessens2018-06-061-1/+1
| | | | | Those methods only use coredata object, so better just move them as a coredata method.
* Delay backend creation until project() is parsedXavier Claessens2018-06-061-1/+32
| | | | | | | | The project() function could have a different value for the backend option in its default_options kwargs. Also set backend options, passing them in command line had no effect previously.