CREXX

REXX Language implementation

View the Project on GitHub adesutherland/CREXX

The crexx Tool

The crexx tool is the convenience driver for common \crexx{} workflows. It can compile, assemble, execute, link, and package programs without requiring the user to call each toolchain binary by hand.

It is also useful in larger builds because it keeps the release defaults in one place: headerless scripts compile as Level B with rxfnsb imported, native packaging runs through rxlink before rxcpack, and source/binary import paths are passed to the compiler phase consistently.

Use cases

Options

Options are used to differentiate between the choices that can be made while building a program. All options have defaults so that they can be left out in standard cases.

Verbosity

With the default verbosity level the tools behaves in the standard unix way where a lack of messages indicates success. This level can be increased gradually to a full explanation of everything that is done.

Options description

The following options are available (single and double dashes work for all options):

-help
Display help on the usage of this tool.
-version
Display the version of this tool. This is the same as the compiler and interpretr version.
-exec
Execute the compiled .rxbin under rxvme (default).
-noexec
Compile only; do not execute the resulting .rxbin.
-compile
Compile all REXX program files on the command line to .rxbin files (default).
-nocompile
Skip the rxc and rxas phases and reuse an existing <stem>.rxbin.
-native
Compile to a native executable; default --nonative. This produces an executable file for the current operating system and instruction set architecture. The native route now links the compiled program with rxlink before rxcpack generates C source.
-nonative
Disable native packaging.
-verbose[0-4]
Report on progress; default verbose0, which only issues error messages when the compile fails. Verbose 2 shows the command lines to the toolchain utilities rxc, rxas and rxvme. Verbose 3 includes options and source listings, while verbose 4 includes the contents of the generated assembly code.
-[no]colo[u]r
Enable or disable colourized progress output.
-[no]optimize
Enable or disable optimization.
-keep
Keep compile/link intermediates (default).
-nokeep
Delete compile/link intermediates after the run.
-decimal
Use decimal arithmetic where the driver has to choose arithmetic mode.
-l[library path]
Use a packaged binary/runtime library relative to CREXX_HOME/bin. Runtime/native library loading is separate from the compiler’s -s and -i import-discovery paths.

For native packaging, crexx now separates -l inputs into two groups:

This keeps the direct interpreter path fast while still producing compact native executables.

-s[path] or --source path
Add an extra source import root for the rxc phase. This is for off-directory .rexx modules that should be visible to source import discovery.
-i[path]
Add an extra raw binary import root for the rxc phase. This is for .rxbin imports discovered during compilation.
--import-rxas
Allow the rxc phase to auto-import .rxas files from binary roots. This is off by default.
--linkmap path
When using -native, ask rxlink to write a link map.
--link-keep-source
When using -native, keep source/file metadata in the linked intermediate instead of using the default stripped output.
--link-keep-inline
When using -native, keep inline-body metadata in the linked intermediate. The native link strips this metadata by default because it is only needed by later compiler imports and debugging/tooling checks.

-s, -i, and --import-rxas are compile-time controls only. They do not automatically add runtime modules to rxvme or to native links. For runtime/native library loading, continue to use -l.

Headerless top-level scripts are still compiled with --level levelb --import rxfnsb.

Examples

  1. or function librariesÂ