summaryrefslogtreecommitdiff
path: root/mesonbuild/mconf.py
Commit message (Collapse)AuthorAgeFilesLines
* fix various flake8 whitespace errorsEli Schwartz2021-10-271-1/+1
|
* Add support for module optionsXavier Claessens2021-10-081-0/+10
|
* remove f from f-string that has no formattingEli Schwartz2021-10-041-1/+1
|
* coredata: Invalidate deps cache when changing wrap_mode optionXavier Claessens2021-06-111-2/+1
| | | | Fixes: #8858
* mconf: line wrap columns nicelyDylan Baker2021-04-201-6/+48
| | | | | | | | | | | | I've picked 160 characters as a default because anything less than that looks terrible and has awful wrapping going on. However, this respects the $COLUNNS environment variable if set, and otherwise will query the terminal to determine the size. This is all achieved through an application of shtuil.get_terminal_size, textwrap, print formatters, and iteration. Fixes #6965
* mconf: cleanup up and sort importsDylan Baker2021-04-201-2/+7
|
* mconf: print core options for subprojectsDylan Baker2021-04-201-2/+4
| | | | Looking in the right dictionary is pretty useful, actually.
* mass rewrite of string formatting to use f-strings everywhereEli Schwartz2021-03-041-1/+1
| | | | performed by running "pyupgrade --py36-plus" and committing the results
* various python neatness cleanupsEli Schwartz2021-03-041-1/+1
| | | | | | | | | | | | | | | | All changes were created by running "pyupgrade --py3-only --keep-percent-format" and committing the results. I have not touched string formatting for now. - use set literals - simplify .format() parameter naming - remove __future__ - remove default "r" mode for open() - use OSError rather than compatibility aliases - remove stray parentheses in function(generator) scopes
* mconf: only print correct options in the correct sectionsDylan Baker2021-02-171-2/+2
| | | | | | | A predicate in two comprehensions was dropped, in what looks like a rebase error on my part. With the predicate added things work correctly. Fixes: #8344
* Keep buildtype the same even if user changes debug and/or optimization.Jussi Pakkanen2021-01-191-0/+11
|
* Use a single coredata dictionary for optionsDylan Baker2021-01-041-14/+20
| | | | | | | This patches takes the options work to it's logical conclusion: A single flat dictionary of OptionKey: UserOptions. This allows us to simplify a large number of cases, as we don't need to check if an option is in this dict or that one (or any of 5 or 6, actually).
* use OptionKey for builtin and base optionsDylan Baker2021-01-041-40/+20
| | | | | | | | I would have prefered to do these seperatately, but they are combined in some cases, so it was much easier to convert them together. this eliminates the builtins_per_machine dict, as it's duplicated with the OptionKey's machine parameter.
* move OptionKey to mesonlibDylan Baker2021-01-041-1/+2
| | | | | There's starting to be a lot of things including coredata that coredata needs to itself include. putting it in mesonlib makes more sense
* use OptionKey for compiler_optionsDylan Baker2021-01-041-7/+4
|
* use OptionKey for backend_optionsDylan Baker2021-01-041-2/+2
|
* use OptionKey for coredata.user_optionsDylan Baker2021-01-041-2/+15
|
* movve insert_build_prefix to mconfDylan Baker2021-01-041-2/+8
| | | | that's the only place it's used anyway.
* use the OptionKey type for command line and machine filesDylan Baker2021-01-041-1/+1
|
* Refactor handling of machine file optionsXavier Claessens2020-10-161-8/+2
| | | | | | It is much easier to not try to parse options into complicated structures until we actually collected all options: machine files, command line, project()'s default_options, environment.
* typing: more fixesDaniel Mensinger2020-09-081-2/+6
|
* mconf/mintro: use authoritative list of options from coredataDylan Baker2020-08-011-13/+1
| | | | | This splits the directory options and non-directory options into two dicts, and then merges them later to maintain API.
* mconf: Fix regression when printing all optionsXavier Claessens2020-06-181-8/+8
| | | | This is a regression introduced by #5489
* Compiler options per langJohn Ericson2020-04-201-6/+11
| | | | | | | | | | | A current rather untyped storage of options is one of the things that contributes to the options code being so complex. This takes a small step in synching down by storing the compiler options in dicts per language. Future work might be replacing the langauge strings with an enum, and defaultdict with a custom struct, just like `PerMachine` and `MachineChoice`.
* Fix typos found by codespellWolfgang Stöggl2019-11-061-1/+1
| | | | - Typos were found by codespell v1.16.0
* mconf: Fix printing options when there is no compiler/project optionsXavier Claessens2019-10-221-3/+3
| | | | Closes: #6087
* mconf: Group all options per subproject and align all groupsXavier Claessens2019-10-181-72/+115
| | | | | Also hide value of yielding subproject options to make it clear the value must be set on the main project.
* mconf: Fix meson configure crash (fixes #5909)Daniel Mensinger2019-09-131-2/+2
|
* Do not print build and host settings when compiling natively.Jussi Pakkanen2019-08-061-8/+14
|
* Per machine do 'build.' and '' option prefixesJohn Ericson2019-06-051-5/+8
| | | | See the docs/ changes for details.
* Use dependency cacheDylan Baker2019-05-201-1/+2
|
* mconf: Don't change the type of coredata.depsDylan Baker2019-05-161-1/+1
| | | | | Which is an OrderedDict, but mconf changes to a plain dict. This will work fine with Python 3.7+, but not with 3.5 and 3.6
* ast: fix #5376Daniel Mensinger2019-05-131-1/+2
|
* mconf: Limit the line length of the choices columnDaniel Mensinger2019-02-171-1/+15
|
* Merge pull request #4743 from dcbaker/native-file-extendedJussi Pakkanen2019-02-121-2/+1
|\ | | | | Extend native files to store install path information
| * allow setting directory locations in a native fileDylan Baker2019-02-111-2/+1
| | | | | | | | | | | | This allows the person running configure (either a developer, user, or distro maintainer) to keep a configuration of where various kinds of files should end up.
* | Merge pull request #4826 from mensinda/confDefOptsJussi Pakkanen2019-02-121-11/+48
|\ \ | |/ |/| mconf: Use introspection to print the project default options (fixes #2543)
| * Fixed some code issuesDaniel Mensinger2019-02-051-5/+9
| |
| * mconf: Use introspection to print the project default options (fixes #2543)Daniel Mensinger2019-01-251-14/+47
| |
* | Never access environment.properties downstreamJohn Ericson2019-02-021-1/+5
|/ | | | | | | | | | | | | | | | | Instead use coredata.compiler_options.<machine>. This brings the cross and native code paths closer together, since both now use that. Command line options are interpreted just as before, for backwards compatibility. This does introduce some funny conditionals. In the future, I'd like to change the interpretation of command line options so - The logic is cross-agnostic, i.e. there are no conditions affected by `is_cross_build()`. - Compiler args for both the build and host machines can always be controlled by the command line. - Compiler args for both machines can always be controlled separately.
* Merge pull request #4732 from mensinda/introMesonInfo2Jussi Pakkanen2019-01-071-0/+4
|\ | | | | mintro: Added `meson-info.json` introspection information about the latest meson run
| * Added meson-info.jsonDaniel Mensinger2019-01-061-0/+4
| |
* | use same code for printing options in mconf and msetupNicolas Schneider2019-01-061-11/+10
|/ | | | | Also, options are now responsible for providing a suitable printable representation of their value instead of handling this at the caller.
* Merge pull request #4547 from mensinda/introIncDirsJussi Pakkanen2019-01-061-0/+2
|\ | | | | mintro: Save introspection to disk and --targets modifications
| * Split the monolithic introspection file into chunksDaniel Mensinger2019-01-061-1/+1
| |
| * Update intro dump on meson configureDaniel Mensinger2019-01-061-0/+2
| |
* | fix meson configure exception when install_umask is not an intNicolas Schneider2019-01-061-1/+1
|/
* Sorted arrays alphabeticallyDaniel Mensinger2018-11-241-11/+11
|
* Recover when coredata cannot be loadedXavier Claessens2018-11-061-0/+1
| | | | | | | | | | | | | Write command line options into a separate file to be able to reconfigure from scatch in the case coredata cannot be loaded. The most common case is when we are reconfiguring with a newer meson version. This means that we should try as much as possible to maintain backward compatibility for the cmd_line.txt file format. The main difference with a normal reconfigure is it will use new default options values and will read again environment variables like CFLAGS, etc.
* Use a single ArgumentParser for all subcommandsXavier Claessens2018-10-041-8/+2
| | | | | | This has the adventage that "meson --help" shows a list of all commands, making them discoverable. This also reduce the manual parsing of arguments to the strict minimum needed for backward compatibility.