aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/msetup.py
AgeCommit message (Collapse)AuthorFilesLines
2022-09-19avoid importing the entire codebase at first startupEli Schwartz1-1/+5
We want to optimize out some internal codepaths used at build time by avoiding work such as argparse. This doesn't work particularly well when the argparse arguments are imported before then. Between them, they indirectly import pretty much all code anywhere, and msetup alone imports most of it. Also make sure the regenerate internal script goes directly to msetup.
2022-08-22fix up some message strings that don't include "setup" in the configure commandEli Schwartz1-1/+1
2022-05-04devenv: Use PkgConfigDependency.get_env()Xavier Claessens1-1/+3
This ensures that PKG_CONFIG_PATH, PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR are also set properly.
2022-02-28Add API for modules that wants to define their devenvXavier Claessens1-1/+8
2021-10-10Add --vsenv command line option and active VS only when neededXavier Claessens1-0/+4
2021-09-12deprecate layout=flat and warn people never to use itEli Schwartz1-0/+7
It's broken in various circumstances, no one seems to actually use it, CI doesn't test it, no one is committed to maintaining it, etc. etc. etc. Also, projects doing trivially reasonable things, such as generating "foo/util.py" and "bar/util.py", create clashing output names. This will never, ever, ever, ever work with layout=flat. Closes #996 Closes #1521 Closes #1908 Closes #7133 Closes #7135 Closes #7480 Closes #8378
2021-09-12msetup: make xcode unsupported warning actually showEli Schwartz1-2/+5
Until we invoke interpreter.Interpreter(b, ...) the coredata options still have their default values and thus cannot be used sensibly. Currently the warning never shows (other than, unsurprising in retrospect, during --internal regenerate).
2021-09-02interpreter: Add summary of all user defined optionsXavier Claessens1-8/+7
It is a commonly needed information to help debugging build issues. We already were printing options with non-default value at the end of the configure but outside of the summary. Keeping the list of user defined options in the interpreter will also in the future be useful to use new default value on reconfigure.
2021-06-29fix: Always explicitly set encoding for text files (fixes #8263)Daniel Mensinger1-2/+2
2021-04-17msetup: Restore .gitignore after wipeXavier Claessens1-0/+1
2021-03-22cmd_line_file.txt: Use cross/native file path resolved by coredataXavier Claessens1-0/+4
This fix issue when using --wipe and the machine file was passed as a pipe and written locally, or when the file was resolved in XDG_DATA_HOME or XDG_DATA_DIRS. Fixes: #8560
2021-03-16Add `meson devenv` command and meson.add_devenv()Xavier Claessens1-0/+1
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz1-6/+6
performed by running "pyupgrade --py36-plus" and committing the results
2021-01-04Use a single coredata dictionary for optionsDylan Baker1-1/+1
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-1/+1
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.
2020-12-28Incorrect source-build directory error when using network paths on WindowsSamuel Longchamps1-2/+5
2020-12-13Add VCS ignore files to build dir on creation. Closes #6509.Jussi Pakkanen1-0/+19
2020-11-07Fix host machine reporting typo in msetup.pyCorey McNeish1-1/+1
2020-09-13mcompile: Add some basic XCode supportNirbheek Chauhan1-0/+2
I wrote this to convert run_tests.get_backend_commands() over to the new meson wrappers, but that turned out to be harder than I expected, so just splitting this out for now.
2020-09-08typing: more fixesDaniel Mensinger1-6/+12
2020-09-08typing: fully annotate mcompile, minit, and msetupDaniel Mensinger1-5/+5
2020-04-29Fix symlink deletion with --wipe optionLaurent Pinchart1-1/+1
When wiping a build tree with --wipe, every entry in the build directory is removed with mesonlib.windows_proof_rmtree() for directories and mesonlib.windows_proof_rm() for other files. Symlinks to directories are considered directories, resulting in the former being called. This causes an exception to be raised, as the implementation calls shutil.rmtree(), which isn't allowed on symlinks. Fix this by using mesonlib.windows_proof_rm() for symlinks. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-04-10Fix typo in help of option '--wipe' [skip ci]Jens Carl1-1/+1
2020-03-03Cherry-picking - (rm python2 % add python3 .format) (#6725)Michael Brockus1-4/+4
2020-02-12meson: unbreak --profile-selfMarcel Hollerbach1-1/+1
This broke in 668610c0d2b0f3a66d96022eb57afe5b09c3a2b7.
2020-01-28backend: refactor: set self.interpreter in the constructorDaniel Mensinger1-1/+1
2020-01-08types: import typing as T (fixes #6333)Daniel Mensinger1-3/+3
2019-11-07CI: add initial type annotation checkingMichael Hirsch, Ph.D1-7/+7
2019-09-25Print user defined options in meson-log.txtXavier Claessens1-0/+1
It can be useful to know what options have been passed to the command line, excluding default values. Closes: #5956
2019-08-12Put native file before cross file in options listJohn Ericson1-4/+4
I think this makes more sense by matching how build comes before host. Native builds are also more common than cross builds.
2019-08-11Print only host platform info in some cases during native buildsJussi Pakkanen1-6/+9
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.
2019-06-23coredata: Correctly handle receiving a pipe for native/cross filesDylan Baker1-28/+29
* coredata: Correctly handle receiving a pipe for native/cross files In some cases a cross/native file may be a pipe, such as when using bash process replacement `meson --native-file <([binaries]llvm-config='/opt/bin/llvm-config')`, for example. In this case we copy the contents of the pipe into a file in the meson-private directory so we can create a proper ninja dependency, and be able to reload the file on --wipe/--reconfigure. This requires some extra negotiation to preserve these native/cross files. Fixes #5505 * run_unitests: Add a unit test for native files that are pipes Using mkfifo.
2019-05-05fix error when show default config of listClouds1-1/+1
the error would occurs when specifying c_winlibs
2019-04-13Run postconf scripts absolutely last.Elliott Sales de Andrade1-2/+3
Introspection is broken if they are run any earlier.
2019-04-05dependencies: Add command line option for pkg_config_pathDylan Baker1-8/+0
This creates a new command line option to store pkg_config_path into, and store the environment variable into that option. Currently this works like the environment variable, for both cross and native targets.
2019-03-20mesonbuild: allow multiple --cross-file optionsRoss Burton1-1/+3
Just like --native-file, allow multiple --cross-file options. This is mostly unifying the logic between cross_files and config_files.
2019-01-07Merge pull request #4732 from mensinda/introMesonInfo2Jussi Pakkanen1-6/+12
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-2/+3
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-6/+12
2019-01-06Added unit testDaniel Mensinger1-3/+0
2019-01-06Some code cleanupDaniel Mensinger1-1/+5
2019-01-06Moved the source and compiler generation to the backendDaniel Mensinger1-1/+1
2019-01-06Fixed tests and benchmarksDaniel Mensinger1-2/+5
2019-01-06Initial automatic target file generationDaniel Mensinger1-0/+4
2018-12-20msetup: Fix callig meson --wipe inside a build directoryDylan Baker1-1/+9
This seems to be related to deleting the current working directory. Simply deleting all of the trees inside the build directory instead seems to fix it. This only appears with some combination of generated targets, running the test case against say "1 trivial" doesn't show the bug. See this mesa bug: https://bugs.freedesktop.org/show_bug.cgi?id=109071
2018-12-19msetup: Give a nice error message if cmd_line.txt cannot be readDylan Baker1-2/+7
As would happen if someone tried to manually call meson --wipe on a directory configured with a version < 0.49.0
2018-11-14Get basic native config file loading workingDylan Baker1-0/+4
2018-11-06Add --wipe command line optionXavier Claessens1-6/+32
It is similar to --reconfigure but completely wipe the build directory first. It is intended to make easier to rebuild project when builddir somehow got corrupted. Fixes #3542.
2018-11-06Recover when coredata cannot be loadedXavier Claessens1-0/+4
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.
2018-10-17msetup: Remove dead codeXavier Claessens1-9/+0