Xavier Claessens
3970f269fd
Fix assert(not true) raising backtrace
...
When no message is provided to assert(), it uses the ast printer to show
the condition that failed. In this case the 'not' is the first string
appended to the result, self.result[-1] would raise range error.
4 years ago
Daniel Mensinger
96eeef62ea
ast: Add AST JSON printer
5 years ago
Dylan Baker
29ef4478df
compilers/d: Add b_ndebug support
...
D lang compilers have an option -release (or similar) which turns off
asserts, contracts, and other runtime type checking. This patch wires
that up to the b_ndebug flag.
Fixes #7082
5 years ago
Daniel Mensinger
d67888bf9b
types: Remove redundant __init__() -> None annotation
5 years ago
Daniel Mensinger
a75255bc4c
types: Annotate the AST visitors
5 years ago
Daniel Mensinger
c14aea2812
types: Annotate mparser.py
...
This also fixes that the keys in ArgumentNode.kwargs are
all of the type BaseNode now. Before this commit, it was
possible that both strings and Nodes where used as keys.
5 years ago
Xavier Claessens
552e78da4d
assert(): Make message argument optional
5 years ago
Daniel Mensinger
35b4ae5d61
ast: printer fix index node printing
6 years ago
Dylan Baker
346ab9f0d8
ast/printer: remove useless ternary
...
The ternary returns True or False from an expression that returns True
or False: i.e. True if bool(value) else False.
6 years ago
Daniel Mensinger
dbb94f122d
Fixed style issues
6 years ago
Daniel Mensinger
b7c6f3ec72
Can now rewrite files
6 years ago
Daniel Mensinger
277dc10a5d
AST post processing
6 years ago
Daniel Mensinger
46320bfba8
Added Ast printer
6 years ago
Daniel Mensinger
ccad493e85
Basic AST visitor pattern
6 years ago
Christoph Burger-Scheidlin
e4a83e47d4
Fix __main__.py for zipapp to work
...
0a035de
removed main from meson.py breaking the call from __main__.py.
This causes zipapps to fail, since the call to meson.main() fails.
Copying the invocation from meson.py fixes this issue.
Additionally, add a test to run_meson_command_tests.py that
builds a zipapp from the source and attempts executing this
zipapp with --help to ensure that the resulting zipapp is
properly executable.
6 years ago
Franz Zapata
4b5a0e5de7
Reintroduce Python Zipapp support
...
* Added `main` function as an entry point.
* Created `__main__.py` to allow the creation of Zipapps without explicitly
calling `meson:main`.
8 years ago
Jussi Pakkanen
455e55f8e5
Back to .py suffix in files. Closes #394 .
9 years ago
Jussi Pakkanen
23b98cd6e6
Renamed meson package to mesonbuild so that we can have a script named meson in the same toplevel dir.
9 years ago
Jussi Pakkanen
2ee27504a8
Moved mesonconf implementation in the module.
9 years ago
Jussi Pakkanen
ec44795f8a
Moved all wrap related things to their own submodule.
9 years ago
Jussi Pakkanen
66c01401de
Moved scripts in the module and started work to run them via the main meson command.
9 years ago
Jussi Pakkanen
8b1039fa30
Organise files into a module structure.
9 years ago
Thibault Saunier
33b2a414e9
Make it working on python 3.3
9 years ago
Yoav Alon
a4809cf632
Added support for extended command line to overcome OS command line length limitation
9 years ago
Jussi Pakkanen
1caf7e6f4a
Yet another step in the neverending saga of -Wpedantic.
9 years ago
Wink Saville
60896c0f04
Add --version to command line arguments.
9 years ago
Jussi Pakkanen
63e803ae0f
Made shared the default libtype as it is faster for daily development.
9 years ago
Jussi Pakkanen
8495075cee
Turned builtin options into proper objects.
9 years ago
Jussi Pakkanen
e2313b85d7
Refactored builtin options to a dictionary and created a new default library target type.
9 years ago
Jussi Pakkanen
c0070aadae
Now that projects can easily override defaults, return warning level to 2.
9 years ago
Jussi Pakkanen
572ce0f451
Added cpu family property to system information.
9 years ago
Thibault Saunier
c24573483d
Do not use intr before it exists
9 years ago
Jussi Pakkanen
067935ce76
Added conf option for build tree layout.
9 years ago
Jussi Pakkanen
384365c843
Added outdir() method to build targets so we can make output dirs togglable.
9 years ago
Jussi Pakkanen
c7e367ac16
Can set default warning with an envvar.
9 years ago
Jussi Pakkanen
6cca79b052
Added multiple selectable warning levels.
9 years ago
Jussi Pakkanen
9d559b2b39
More robust windows detection and more logs.
9 years ago
Jussi Pakkanen
bd5b4deeda
Better sanity testing.
9 years ago
Jussi Pakkanen
30d0c2292f
Support target-only cross compilation properly.
10 years ago
Jussi Pakkanen
37b2a195bd
Get build machine's CPU info too.
10 years ago
Jussi Pakkanen
463d08d545
Now host_machine, build_machine and target_machine are properly separated and return correct values.
10 years ago
Igor Gnatenko
174e72413f
style: fix indenting in meson.py
...
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
10 years ago
Igor Gnatenko
79417eac80
meson: fix undefined-variable in backends chooser
...
E:146,57: Undefined variable 'options' (undefined-variable)
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
10 years ago
Igor Gnatenko
9616bed9fc
introduce check python version in meson.py
...
To ensure that people will not confused that something won't work.
Related: https://github.com/miit-pm/RWD/pull/1#issuecomment-102607931
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
10 years ago
Jussi Pakkanen
b5cec55835
Moved functionality from __main__ to a function to make it callable.
10 years ago
Jussi Pakkanen
ef180676c2
Add command line switch to print version number.
10 years ago
Jussi Pakkanen
3f46cd7fb3
Added gobject-introspection to gnome module.
10 years ago
Jussi Pakkanen
c0f097c0c7
Fix argparse to make rebuild work again.
10 years ago
Jussi Pakkanen
baa0782a22
Use argparse in introspector.
10 years ago
Jussi Pakkanen
b82584641a
Use argparse instead of optparse in meson.py.
10 years ago