Commit Graph

29 Commits

Author SHA1 Message Date
Mike Gilbert 41c96d50af mcompile: treat load-average as a float
`ninja -l` accepts a double. We should do the same.

Bug: https://bugs.gentoo.org/810655
2021-08-29 22:19:52 -04:00
Eli Schwartz dd31891c1f more f-strings too complex to be caught by pyupgrade 2021-07-05 17:55:04 +03:00
Daniel Mensinger 3e396b3782
fix: Always explicitly set encoding for text files (fixes #8263) 2021-06-29 11:28:08 +02:00
Eli Schwartz 6a0fabc647
mass rewrite of string formatting to use f-strings everywhere
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04 17:16:11 -05:00
Eli Schwartz 76df995ba6
raw string literals are next to godliness
Invalid escape sequences are deprecated and will be removed from a
future version of python. Use r"" to define them so they remain
readable.
2021-03-04 17:09:00 -05:00
Eli Schwartz c7ddde58fd
mcompile: do not pass the builddir to ninja if it is the current directory
Because when you don't specify -C, this logging feels silly:

ninja: Entering directory `.
2021-02-23 19:37:04 -05:00
Eli Schwartz 691eb0250a
mcompile: make sure arguments are passed in the correct order
meson compile itself doesn't permit GNU-style argument permutation, i.e.
TARGET to precede options, so why should we expect ninja to?

And indeed, ninja doesn't document support for this -- but it does
accept it anyway, which is confusing and results in people thinking it's
"supposed to" work.

However, if NINJA=samu then this is in fact enforced. samu does not
permit GNU-style argument permutation. As a result, the arguments passed
to mcompile are actively re-ordered before being passed to the
subprocess, and samu dies with a fatal error.

Fix ordering in mcompile.py and add a comment to warn future readers
that the order does, in fact, matter.
2021-02-23 19:37:03 -05:00
Antonin Décimo 39ede12aa5 Fix misspells
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
2021-01-13 12:53:10 -05:00
Dylan Baker e81acbd606 Use a single coredata dictionary for options
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-04 12:20:58 -08:00
Daan De Meyer e828c670f5 Remove "Found runner: " logging message from meson compile
The ninja path is already logged as part of configure. Logging it
again every time when using meson compile is overly verbose and
doesn't add much value for the user.
2020-12-07 10:05:00 -08:00
Dylan Baker f6672c7a19 use real pathlib module
We added the _pathlib module to work around defeciencies in python 3.5's
implementation, since we now rely on 3.6 lets drop this
2020-11-20 15:08:40 -08:00
Daniel Mensinger 1dfaccfd91 pathlib: Fix resolve() by overriding it in Python 3.5 2020-10-04 10:45:48 +02:00
Vili Väinölä 32cf7a03d2 Fix meson compile for 32-bit MSVC build
- Remove platform from env so that msbuild does not try to compile
e.g. configuration debug|x86
2020-10-02 09:09:43 +00:00
Nirbheek Chauhan 7fbdf38ce3 mcompile: Add some basic XCode support
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-13 20:44:30 +03:00
Daniel Mensinger 8f95efe40b
typing: fixup of #7688
This bug not beeing caught in review is another reason for
adding strict typing support to meson.
2020-09-08 20:15:59 +02:00
Daniel Mensinger 23818fc5a3
typing: more fixes 2020-09-08 20:15:58 +02:00
Daniel Mensinger c637b913c9
typing: fully annotate mcompile, minit, and msetup 2020-09-08 20:15:57 +02:00
Paolo Bonzini 492afe50a4 environment: use ExternalProgram to find ninja
This allows the NINJA environment variable to support all the Windows special
cases, especially allowing an absolute path without extension.

Based on a patch by Yonggang Luo.

Fixes: #7659
Suggested-by: Nirbheek Chauhan <nirbheek@centricular.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-04 15:38:12 +02:00
Nirbheek Chauhan f4bac06bd9 mcompile: Also support -v for verbose
This matches `meson test`, and there's really no other meaning that
could be attributed to this, since you would call `meson` to get the
version, not the `compile` sub-command.
2020-08-31 22:59:57 +03:00
Igor Raits efaa752009 mcompile: use -v instead of --verbose for ninja
The `--verbose` has been added to ninja in 1.9.0 and we pretend that we have compatibility with Ninja 1.7+.

References: bf7517505a
2020-08-30 23:36:45 +03:00
TheQwertiest 5696a5abba Added ability to specify target in `meson compile` 2020-06-29 19:54:38 +03:00
TheQwertiest 4d0233540f Added ability to pass arguments to backend in `meson compile` 2020-06-28 18:13:49 -04:00
Igor Raits d6c6b933c4 mcompile: Add --verbose mode
Closes: https://github.com/mesonbuild/meson/issues/7352
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
2020-06-21 23:49:39 +03:00
TheQwertiest 1d02fd924b mcompile: removed unneeded imports 2020-05-26 13:45:03 -04:00
TheQwertiest 4b6471f1d5 mcompile: detect_ninja 2020-05-26 13:45:03 -04:00
TheQwertiest 7c2f9e2b57 mcompile: replaced intro with cdata + extracted code to funcs 2020-05-26 13:45:03 -04:00
TheQwertiest b9c9024e84 mcompile: replaced backend divination code + cleanup 2020-05-26 13:45:03 -04:00
Nirbheek Chauhan 04ed3810ed mcompile: Use the current dir if unspecified
With this running `meson compile` inside the builddir actually works,
and you don't have to do `meson compile -C .`

Clearly this was the intent since the option already has `default='.'`
2020-04-08 23:44:31 +03:00
Dylan Baker 1210a67f66 mesonbuild: Add mcompile command
This is tested working with both msbuild and ninja/samu. Since our xcode
support is pretty much broken I didn't bother.

Fixes #6670
2020-03-04 14:07:27 -05:00