summaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
Commit message (Collapse)AuthorAgeFilesLines
...
* | Have set() and set_quoted() of configuration object work with newlines.Jehan2019-11-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Have set() and set_quoted() of configuration object work with newlines. set_quoted() makes the value into a double-quoted string, so let's assume C-style string, in particular with newlines as "\n". Also take care of remaining newlines in dump_conf_header(). C or nasm macros expect single-line values so if the value was multi-line, we would end up with broken syntax. Appending a backslash at each end of line make them concat into a single line in both C and nasm format (note: multi-line macros in nasm are actually possible apparently but use another format not outputted by current meson code). Also note that the replacement is done at the end only when dumping the conf as a header because we cannot assume anything about the format when replacing variables from an input file (in this case, it should be the dev responsibility). * Add unit tests for multiline set() and set_quoted().
* | Interpreter: display linker executable path, if availableEric Le Bihan2019-11-191-1/+1
|/ | | | | Instead of only displaying the identifier of the linker, display also the path to the executable in order to report useful information when cross-compiling.
* Merge pull request #6182 from mensinda/depInfoJussi Pakkanen2019-11-171-20/+24
|\ | | | | Better dependency logs
| * Highlight '(cached)' and add color to the dependency versionDaniel Mensinger2019-11-141-16/+17
| |
| * dependencies: Print version of cached dependenciesDaniel Mensinger2019-11-141-4/+7
| |
* | Issue #6174: run_command() with compiler object behind ccache fails.Jehan2019-11-171-2/+4
|/ | | | | When run_command() first parameter is a compiler object, keep additional exelist values as arguments.
* Store run target names in build.Jussi Pakkanen2019-11-101-0/+3
| | | | | This way we can easily check that we only provide builtin targets such as clang-format if the user has not provided their own.
* Make the hint about built-in options more usefulZbigniew Jędrzejewski-Szmek2019-11-081-6/+12
| | | | | | | | | In a large project, it can be hard to guess what meson "had in mind", when many different warnings are added in different places. Let's make the message precise and specify the location. WARNING: Consider using the built-in warning_level option instead of adding warning flags by hand. ↓ meson.build:414: WARNING: Consider using the built-in warning_level option instead of using "-Wextra".
* "built-in" is the standard spelllingZbigniew Jędrzejewski-Szmek2019-11-081-5/+5
|
* Created the filesystem module.Jussi Pakkanen2019-11-081-1/+2
|
* Fix typos found by codespellWolfgang Stöggl2019-11-061-1/+1
| | | | - Typos were found by codespell v1.16.0
* raise exception when a non-required module not found and subsequently usedMichael Hirsch, Ph.D2019-10-221-0/+2
|
* path interpreter--silently discard invalid Unix relative paths on WindowsMichael Hirsch, Ph.D2019-10-111-0/+4
| | | | | | | | | fixes #6000 The idea is that end-users want to specify an array of directories to search by default without an if/elif stack. It's obvious that Unix absolute paths are not absolute on Windows, so silently discard Unix absolute paths here for Windows instead of raising exception.
* Merge pull request #5953 from mensinda/isystemJussi Pakkanen2019-10-061-2/+23
|\ | | | | Add is_system to dependency
| * Use include_type instead of is_systemDaniel Mensinger2019-10-031-9/+7
| |
| * Move generate_system_dependency to DependencyDaniel Mensinger2019-10-031-3/+2
| |
| * add is_system kwarg to dependencyDaniel Mensinger2019-10-031-3/+27
| | | | | | | | | | Also adds the is_system and as_system methods to the dependency holder.
* | interpreter: Combine test and benchmark argsDylan Baker2019-10-021-3/+4
| | | | | | | | | | Adding the test specific args later. This will help prevent bugs where arguments are added to test but not to benchmark even when they apply.
* | interpreter: Correctly handle arguments to benchmarkDylan Baker2019-10-021-1/+6
|/ | | | | | | This fixes two separate issues, one is that benchmark warns about depends and priority; The other is that we passed bad values like is_parallel into the test and would actually run benchmarks in parallel, which is bad.
* Remove unused 'required' argumentXavier Claessens2019-10-011-5/+5
|
* cmake: Write AST into build dirXavier Claessens2019-10-011-5/+6
| | | | | It easier to read it from a file than looking into logs. Users needs to read it to find variable names of generated dependency objects.
* Add depfile to configure_file()Marc-André Lureau2019-09-301-0/+24
| | | | | | | | | In qemu, minikconf generates a depfile that meson could use to automatically reconfigure on dependency change. Note: someone clever can perhaps find a way to express this with a ninja rule & depfile=. I didn't manage, so I wrote a simple depfile parser.
* environment: Support taking values from dictMarc-André Lureau2019-09-291-13/+32
| | | | Related to #5955.
* ConfigurationDataHolder: pass initial_values to ctorMarc-André Lureau2019-09-291-9/+8
|
* configure_file: add feature version checks for taking dictMarc-André Lureau2019-09-291-0/+2
| | | | | | Since commit 38a658214 ("configure_file: Support taking values from a dict" #4236), configuration_data() and configure_file()'s configuration kwarg can take a dict. Add missing version checks.
* removed the InternalDepdendencyHolder, since it is unusedDaniel Mensinger2019-09-251-38/+1
|
* configure_file(): Allow multiple inputs in command modeXavier Claessens2019-09-171-41/+34
| | | | Closes: #5893
* Add test priorities to force test start orderPeter Hutterer2019-08-241-3/+9
|
* Vs backend compiler selection (#5448)Dylan Baker2019-08-241-1/+1
| | | | | | | | | | | | | | | | | | * backends/vs: Only set platform_toolset if it isn't already set * interpreter: set backend up after the compiler Otherwise we won't be able to check which VS toolchain to use. * docs/using-visual-studio: wrap lines * docs: recommend the py launcher instead of python3 for windows * set backend.environment when building a dummy version * backends/vs: Add support for clang-cl with vs2017 and vs2019 backends * backends/vs: Add support for ICL (19.x) with vs2015 and vs2017 backends
* Rerun configuration for all potential input files. Closes #5809.Jussi Pakkanen2019-08-211-3/+4
|
* Merge pull request #5681 from dcbaker/dynamic-linker-splitJussi Pakkanen2019-08-201-0/+4
|\ | | | | split dynamic linker representations from compilers
| * Interpreter: identify the linker being used, if there is oneDylan Baker2019-08-141-0/+4
| |
* | Make .extract_objects() work correctly as an input to custom_targetRachel Mant2019-08-171-2/+3
| |
* | gnome: Handle overriden g-ir-scannerThibault Saunier2019-08-171-1/+5
| | | | | | | | | | | | | | | | | | When g-ir-scanner is overriden, we can't call it at configure time but we know what options are avalaible (as it started using meson after checked options where added) so do not try to call it to retrieve the version as it will fail. Also see https://github.com/mesonbuild/meson/issues/3442
* | expand tilde when looking up libraries -Dfoo=~/mylibMichael Hirsch, Ph.D2019-08-151-3/+7
|/ | | | | | | | It is often desirable to use ~ for home directory in -D compilation args. Why the transform to pathlib.Path and back to str? Because this is one of many places where the list(map(str,..))) will be eliminated upon Python 3.6 being minimum Meson Python requirement.
* Add is_disabler functionJames Hilliard2019-08-121-0/+9
| | | | | | This is useful if one needs to check if a variable is a disabler. Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
* Print only host platform info in some cases during native buildsJussi Pakkanen2019-08-111-3/+6
| | | | | | Build and target info is confusing in that case. However still log that information, as it is useful in case something slips out of sync and needs to be debugged.
* Made build. options alias basic ones when native building.Jussi Pakkanen2019-08-061-0/+2
|
* Do not print build compiler info when not cross compiling. It is confusing.Jussi Pakkanen2019-08-061-2/+3
|
* interpreter: Fix permitted kwargs in dependency.get_variableDylan Baker2019-07-261-1/+1
| | | | default -> default_value
* Add version check support to find_program()Xavier Claessens2019-07-191-3/+35
| | | | Closes: #1609
* fix all flake8 issuesDaniel Mensinger2019-07-181-2/+2
|
* Merge pull request #5606 from xclaesse/alias_targetJussi Pakkanen2019-07-111-5/+21
|\ | | | | Add alias_target() function
| * Add alias_target() functionXavier Claessens2019-07-101-5/+21
| |
* | Warn if the user manually adds arguments we have builtin support for.Jussi Pakkanen2019-07-101-0/+19
|/
* `add_{global,project}_{,link_}arguments`: simply native flag behaviorJohn Ericson2019-06-271-26/+8
| | | | | | | | | | | | | | | | | This further simplifies behavior to match the "build vs host" decision we did with `c_args` vs `build_c_args`. The rules are now simply: - `native: true` affects `native: true` targets - `native: false` affects `native: false` targets - No native flag is the same as `native: false` I like this because you don't even have to know what "build" and "host" mean to understand how it works, and it doesn't depend on whether the overall build is cross or not. Fixes #4933
* correct missing argument for IntelClFortranCompilerMichael Hirsch, Ph.D2019-06-241-8/+8
| | | | | | ifort passes all tests cleanup logic
* Further deduplicate Interpreter native kwarg codeJohn Ericson2019-06-121-15/+15
| | | | | This ensures that invalid arguments properly cause errors, but doesn't otherwise change semantics
* Simplify and dedup machine kwarg -> MachineChoice logic in the interpreterJohn Ericson2019-06-091-16/+8
|
* Purge `is_cross` and friends without changing user interfacesJohn Ericson2019-06-091-71/+66
| | | | | | | | | | | | In most cases instead pass `for_machine`, the name of the relevant machines (what compilers target, what targets run on, etc). This allows us to use the cross code path in the native case, deduplicating the code. As one can see, environment got bigger as more information is kept structured there, while ninjabackend got a smaller. Overall a few amount of lines were added, but the hope is what's added is a lot simpler than what's removed.