## MESSAGES
### `-W`, `--warn`
-
Show additional warnings (advices).
By default, only important warnings are displayed.
in order to let people fix them before promoting the advice to an important warning.
### `-w`, `--warning`
-
Show/hide a specific warning.
Each type of warning can be individually displayed or hidden.
May be used more than once.
### `-o`, `--output`
-Output executable name.
+Filename of the generated executable.
Indicates the path and name of the produced executable.
Note: it is better to use `--dir` if only the directory is important.
This way, the platform extension will be correctly set.
-### `-o` is not usable if multiple programs are compiled at once.
+`-o` is not usable if multiple programs are compiled at once.
### `--dir`
Output directory.
Note that, to be useful, the compilation directory is not destroyed when `--no-cc` is used.
-### `-m`
+### `-m`, `--mixin`
Additional module to mix-in.
Additional modules are imported and refine the main module of the program.
It also produces executables that are a little bit smaller since static memory does not have to store the colors.
### `--substitute-monomorph`
-Replace monomorphic trampolines with direct call.
+Replace monomorphic trampolines with direct calls.
Late-binding is implemented with *trampolines*, that are small functions that just select and jump the to right implementations.
If, at link-time, is it known that the target will always by the same implementation then all calls to the trampoline are replaced by
### `--trampoline-call`
Use an indirection when calling.
-Just add the trampolines of `--substitute-monomorph` without doing any aditionnal optimizations.
+Just add the trampolines of `--substitute-monomorph` without doing any additionnal optimizations.
### `--no-tag-primitives`
Use only boxes for primitive types.
Do not generate main entry point.
### `--no-stacktrace`
-The compiled program will not display stack traces on runtime errors.
+Disable the generation of stack traces.
+
+With this option, the compiled program will not display stack traces on runtime errors.
Because stack traces rely on libunwind, this option might be useful in order to generate more portable binaries
since libunwind might be non available on the runtime system (or available with an ABI incompatible version).
# Add compiling options
redef class ToolContext
# --output
- var opt_output = new OptionString("Output file", "-o", "--output")
+ var opt_output = new OptionString("Filename of the generated executable", "-o", "--output")
# --dir
var opt_dir = new OptionString("Output directory", "--dir")
# --no-cc
- var opt_no_cc = new OptionBool("Do not invoke C compiler", "--no-cc")
+ var opt_no_cc = new OptionBool("Do not invoke the C compiler", "--no-cc")
# --no-main
var opt_no_main = new OptionBool("Do not generate main entry point", "--no-main")
# --make-flags
- var opt_make_flags = new OptionString("Additional options to make", "--make-flags")
+ var opt_make_flags = new OptionString("Additional options to the `make` command", "--make-flags")
# --max-c-lines
var opt_max_c_lines = new OptionInt("Maximum number of lines in generated C files. Use 0 for unlimited", 10000, "--max-c-lines")
# --group-c-files
# --no-check-attr-isset
var opt_no_check_attr_isset = new OptionBool("Disable isset tests before each attribute access (dangerous)", "--no-check-attr-isset")
# --no-check-assert
- var opt_no_check_assert = new OptionBool("Disable the evaluation of explicit 'assert' and 'as' (dangerous)", "--no-check-assert")
+ var opt_no_check_assert = new OptionBool("Disable the evaluation of explicit `assert` and `as` (dangerous)", "--no-check-assert")
# --no-check-autocast
var opt_no_check_autocast = new OptionBool("Disable implicit casts on unsafe expression usage (dangerous)", "--no-check-autocast")
# --no-check-null
# --no-stacktrace
var opt_no_stacktrace = new OptionBool("Disable the generation of stack traces", "--no-stacktrace")
# --no-gcc-directives
- var opt_no_gcc_directive = new OptionArray("Disable a advanced gcc directives for optimization", "--no-gcc-directive")
+ var opt_no_gcc_directive = new OptionArray("Disable advanced gcc directives for optimization", "--no-gcc-directive")
# --release
var opt_release = new OptionBool("Compile in release mode and finalize application", "--release")
# -g
- var opt_debug = new OptionBool("Compile in debug mode (no C-side optimization)", "--debug", "-g")
+ var opt_debug = new OptionBool("Compile in debug mode (no C-side optimization)", "-g", "--debug")
redef init
do
# --no-inline-intern
var opt_no_inline_intern = new OptionBool("Do not inline call to intern methods", "--no-inline-intern")
# --no-union-attribute
- var opt_no_union_attribute = new OptionBool("Put primitive attibutes in a box instead of an union", "--no-union-attribute")
+ var opt_no_union_attribute = new OptionBool("Put primitive attributes in a box instead of an union", "--no-union-attribute")
# --no-shortcut-equate
var opt_no_shortcut_equate = new OptionBool("Always call == in a polymorphic way", "--no-shortcut-equal")
# --no-tag-primitives
var opt_no_tag_primitives = new OptionBool("Use only boxes for primitive types", "--no-tag-primitives")
# --colors-are-symbols
- var opt_colors_are_symbols = new OptionBool("Store colors as symbols (link-boost)", "--colors-are-symbols")
+ var opt_colors_are_symbols = new OptionBool("Store colors as symbols instead of static data (link-boost)", "--colors-are-symbols")
# --trampoline-call
var opt_trampoline_call = new OptionBool("Use an indirection when calling", "--trampoline-call")
# --guard-call
var opt_guard_call = new OptionBool("Guard VFT calls with a direct call", "--guard-call")
# --substitute-monomorph
- var opt_substitute_monomorph = new OptionBool("Replace monomorph trampoline with direct call (link-boost)", "--substitute-monomorph")
+ var opt_substitute_monomorph = new OptionBool("Replace monomorphic trampolines with direct calls (link-boost)", "--substitute-monomorph")
# --link-boost
var opt_link_boost = new OptionBool("Enable all link-boost optimizations", "--link-boost")
# --inline-some-methods
var opt_inline_some_methods = new OptionBool("Allow the separate compiler to inline some methods (semi-global)", "--inline-some-methods")
# --direct-call-monomorph
- var opt_direct_call_monomorph = new OptionBool("Allow the separate compiler to direct call monomorph sites (semi-global)", "--direct-call-monomorph")
+ var opt_direct_call_monomorph = new OptionBool("Allow the separate compiler to direct call monomorphic sites (semi-global)", "--direct-call-monomorph")
# --direct-call-monomorph0
- var opt_direct_call_monomorph0 = new OptionBool("Allow the separate compiler to direct call monomorph sites (semi-global)", "--direct-call-monomorph0")
+ var opt_direct_call_monomorph0 = new OptionBool("Allow the separate compiler to direct call monomorphic sites (semi-global)", "--direct-call-monomorph0")
# --skip-dead-methods
var opt_skip_dead_methods = new OptionBool("Do not compile dead methods (semi-global)", "--skip-dead-methods")
# --semi-global
# --tables-metrics
var opt_tables_metrics = new OptionBool("Enable static size measuring of tables used for vft, typing and resolution", "--tables-metrics")
# --type-poset
- var opt_type_poset = new OptionBool("Build a poset of types to create more condensed tables.", "--type-poset")
+ var opt_type_poset = new OptionBool("Build a poset of types to create more condensed tables", "--type-poset")
redef init
do
redef class ToolContext
# Option --path
- var opt_path = new OptionArray("Set include path for loaders (may be used more than once)", "-I", "--path")
+ var opt_path = new OptionArray("Add an additional include path (may be used more than once)", "-I", "--path")
# Option --only-metamodel
var opt_only_metamodel = new OptionBool("Stop after meta-model processing", "--only-metamodel")
# Option --only-parse
- var opt_only_parse = new OptionBool("Only proceed to parse step of loaders", "--only-parse")
+ var opt_only_parse = new OptionBool("Only proceed to parse files", "--only-parse")
redef init
do
redef class ToolContext
# --mixin
- var opt_mixins = new OptionArray("Additionals module to min-in", "-m", "--mixin")
+ var opt_mixins = new OptionArray("Additional module to mix-in", "-m", "--mixin")
# --define
var opt_defines = new OptionArray("Define a specific property", "-D", "--define")
redef class ToolContext
# Option --ignore-visibility
- var opt_ignore_visibility = new OptionBool("Do not check, and produce errors, on visibility issues.", "--ignore-visibility")
+ var opt_ignore_visibility = new OptionBool("Do not check, and produce errors, on visibility issues", "--ignore-visibility")
redef init
do
var phases = new POSet[Phase]
# --disable-phase
- var opt_disable_phase = new OptionArray("DEBUG: Disable a specific phase; use `list` to get the list.", "--disable-phase")
+ var opt_disable_phase = new OptionArray("Disable a specific phase; use `list` to get the list (debug)", "--disable-phase")
- # --disable-phase
- var opt_sloppy = new OptionBool("DEBUG: force lazy semantic analysis of the source-code", "--sloppy")
+ # --sloppy
+ var opt_sloppy = new OptionBool("Force lazy semantic analysis of the source-code (debug)", "--sloppy")
redef init
do
var option_context = new OptionContext
# Option --warn
- var opt_warn = new OptionCount("Show more warnings", "-W", "--warn")
+ var opt_warn = new OptionCount("Show additional warnings (advices)", "-W", "--warn")
# Option --warning
var opt_warning = new OptionArray("Show/hide a specific warning", "-w", "--warning")
var opt_set_dummy_tool = new OptionBool("Set toolname and version to DUMMY. Useful for testing", "--set-dummy-tool")
# Option --verbose
- var opt_verbose = new OptionCount("Verbose", "-v", "--verbose")
+ var opt_verbose = new OptionCount("Additional messages from the tool", "-v", "--verbose")
# Option --stop-on-first-error
- var opt_stop_on_first_error = new OptionBool("Stop on first error", "--stop-on-first-error")
+ var opt_stop_on_first_error = new OptionBool("Just display the first encountered error then stop", "--stop-on-first-error")
# Option --keep-going
var opt_keep_going = new OptionBool("Continue after errors, whatever the consequences", "--keep-going")
if opt_stub_man.value then
print """
-% {{{toolname.to_upper}}}(1)
-
# NAME
{{{tooldescription.split("\n")[1]}}}
# SYNOPSYS
-{{{toolname}}} [*options*]...
-
# OPTIONS
"""
for o in option_context.options do
var first = true
+ printn "### "
for n in o.names do
if first then first = false else printn ", "
printn "`{n}`"
end
print ""
- print ": {o.helptext}"
+ print "{o.helptext}."
print ""
end
print """