aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mconf.py
AgeCommit message (Collapse)AuthorFilesLines
2022-07-31Only reconfigure if configure options actually changedDaan De Meyer1-1/+0
Currently, if we run "meson configure -Doption=value", meson will do a reconfigure when running "ninja build" afterwards, even if the new value is the same one that was already configured previously. To avoid this unnecessary reconfigure, let's use replace_if_different() instead of unconditionally replacing the conf file in coredata's save() function.
2022-06-24fix: handle the case where the last item of `four_column` results in being < ↵fxxf1-1/+2
1 (COLUMNS <= 60) by falling back to `_col`, relevant issue #10211
2022-06-10flake8: remove no longer used importsEli Schwartz1-1/+0
2022-04-13mconf: Fix printing <inherited from main project> for yielding optionsXavier Claessens1-13/+9
In print_options() k was a string instead of OptionKey, but self.yielding_options expects OptionKey. Not sure how this has not been catched by mypy. Fix by keeping k as OptionKey which makes self.yielding_options useless. Fixes: #9503
2021-10-27fix various flake8 whitespace errorsEli Schwartz1-1/+1
2021-10-08Add support for module optionsXavier Claessens1-0/+10
2021-10-04remove f from f-string that has no formattingEli Schwartz1-1/+1
2021-06-11coredata: Invalidate deps cache when changing wrap_mode optionXavier Claessens1-2/+1
Fixes: #8858
2021-04-20mconf: line wrap columns nicelyDylan Baker1-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
2021-04-20mconf: cleanup up and sort importsDylan Baker1-2/+7
2021-04-20mconf: print core options for subprojectsDylan Baker1-2/+4
Looking in the right dictionary is pretty useful, actually.
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz1-1/+1
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04various python neatness cleanupsEli Schwartz1-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
2021-02-17mconf: only print correct options in the correct sectionsDylan Baker1-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
2021-01-19Keep buildtype the same even if user changes debug and/or optimization.Jussi Pakkanen1-0/+11
2021-01-04Use a single coredata dictionary for optionsDylan Baker1-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).
2021-01-04use OptionKey for builtin and base optionsDylan Baker1-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.
2021-01-04move OptionKey to mesonlibDylan Baker1-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
2021-01-04use OptionKey for compiler_optionsDylan Baker1-7/+4
2021-01-04use OptionKey for backend_optionsDylan Baker1-2/+2
2021-01-04use OptionKey for coredata.user_optionsDylan Baker1-2/+15
2021-01-04movve insert_build_prefix to mconfDylan Baker1-2/+8
that's the only place it's used anyway.
2021-01-04use the OptionKey type for command line and machine filesDylan Baker1-1/+1
2020-10-16Refactor handling of machine file optionsXavier Claessens1-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.
2020-09-08typing: more fixesDaniel Mensinger1-2/+6
2020-08-01mconf/mintro: use authoritative list of options from coredataDylan Baker1-13/+1
This splits the directory options and non-directory options into two dicts, and then merges them later to maintain API.
2020-06-18mconf: Fix regression when printing all optionsXavier Claessens1-8/+8
This is a regression introduced by #5489
2020-04-20Compiler options per langJohn Ericson1-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`.
2019-11-06Fix typos found by codespellWolfgang Stöggl1-1/+1
- Typos were found by codespell v1.16.0
2019-10-22mconf: Fix printing options when there is no compiler/project optionsXavier Claessens1-3/+3
Closes: #6087
2019-10-18mconf: Group all options per subproject and align all groupsXavier Claessens1-72/+115
Also hide value of yielding subproject options to make it clear the value must be set on the main project.
2019-09-13mconf: Fix meson configure crash (fixes #5909)Daniel Mensinger1-2/+2
2019-08-06Do not print build and host settings when compiling natively.Jussi Pakkanen1-8/+14
2019-06-05Per machine do 'build.' and '' option prefixesJohn Ericson1-5/+8
See the docs/ changes for details.
2019-05-20Use dependency cacheDylan Baker1-1/+2
2019-05-16mconf: Don't change the type of coredata.depsDylan Baker1-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
2019-05-13ast: fix #5376Daniel Mensinger1-1/+2
2019-02-17mconf: Limit the line length of the choices columnDaniel Mensinger1-1/+15
2019-02-12Merge pull request #4743 from dcbaker/native-file-extendedJussi Pakkanen1-2/+1
Extend native files to store install path information
2019-02-12Merge pull request #4826 from mensinda/confDefOptsJussi Pakkanen1-11/+48
mconf: Use introspection to print the project default options (fixes #2543)
2019-02-11allow setting directory locations in a native fileDylan Baker1-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.
2019-02-05Fixed some code issuesDaniel Mensinger1-5/+9
2019-02-02Never access environment.properties downstreamJohn Ericson1-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.
2019-01-25mconf: Use introspection to print the project default options (fixes #2543)Daniel Mensinger1-14/+47
2019-01-07Merge pull request #4732 from mensinda/introMesonInfo2Jussi Pakkanen1-0/+4
mintro: Added `meson-info.json` introspection information about the latest meson run
2019-01-06use same code for printing options in mconf and msetupNicolas Schneider1-11/+10
Also, options are now responsible for providing a suitable printable representation of their value instead of handling this at the caller.
2019-01-06Added meson-info.jsonDaniel Mensinger1-0/+4
2019-01-06Merge pull request #4547 from mensinda/introIncDirsJussi Pakkanen1-0/+2
mintro: Save introspection to disk and --targets modifications
2019-01-06fix meson configure exception when install_umask is not an intNicolas Schneider1-1/+1
2019-01-06Split the monolithic introspection file into chunksDaniel Mensinger1-1/+1