CLI Reference
Command-line interface reference for the XXML compiler. Compile XXML source files to native executables or LLVM IR.
Synopsis
xxml [options] <input.XXML> -o <output>Basic Usage
Compile to Executable
xxml Hello.XXML -o hello.exeGenerate LLVM IR Only
xxml Hello.XXML -o hello.ll --irLegacy Mode (LLVM IR Only)
xxml Hello.XXML -o hello.ll 2Options
| Option | Description |
|---|---|
-o <file> | Output file (.ll for IR, .exe/.dll for binary) |
--ir | Generate LLVM IR only (same as mode 2) |
--processor | Compile annotation processor to DLL |
--use-processor=<dll> | Load annotation processor DLL (can be repeated) |
--stl-warnings | Show warnings for standard library files (off by default) |
2 | Legacy mode: LLVM IR only |
Output Formats
Executable (.exe)
Default compilation target. Produces a native Windows executable.
xxml MyApp.XXML -o myapp.exeLLVM IR (.ll)
Human-readable LLVM intermediate representation. Useful for debugging and optimization analysis.
xxml MyApp.XXML -o myapp.ll --irDynamic Library (.dll)
For annotation processors or shared libraries.
xxml --processor MyProcessor.XXML -o MyProcessor.dllAnnotation Processors
Compiling a Processor
xxml --processor MyAnnotation.XXML -o MyAnnotation.dllUsing a Processor
xxml --use-processor=MyAnnotation.dll App.XXML -o app.exeMultiple Processors
xxml --use-processor=Proc1.dll --use-processor=Proc2.dll App.XXML -o app.exeWarning Control
By default, warnings from standard library files are suppressed. Enable them with:
xxml MyApp.XXML -o myapp.exe --stl-warningsExamples
Basic Compilation
# Compile hello world
xxml Hello.XXML -o hello.exe
# Run the executable
./hello.exeDebug with LLVM IR
# Generate IR for inspection
xxml MyApp.XXML -o myapp.ll --ir
# View the generated IR
cat myapp.llAnnotation Processor Workflow
# 1. Create annotation processor source (MyLogger.XXML)
# 2. Compile to DLL
xxml --processor MyLogger.XXML -o MyLogger.dll
# 3. Use processor when compiling application
xxml --use-processor=MyLogger.dll App.XXML -o app.exeExit Codes
| Code | Meaning |
|---|---|
0 | Successful compilation |
1 | Error (missing arguments, file not found, compilation error) |
File Extensions
| Extension | Description |
|---|---|
.XXML | XXML source file |
.exe | Native executable |
.dll | Dynamic library |
.ll | LLVM IR text format |
Environment
The compiler expects:
- Standard library files in
Language/subdirectory relative to compiler location - LLVM tools (
llc,lld-link) available in PATH for executable generation - Visual Studio Build Tools for Windows linking
Compilation Pipeline
Source (.XXML)
↓
Lexical Analysis
↓
Syntax Analysis (AST)
↓
Semantic Analysis
↓
LLVM IR Generation (.ll)
↓
LLVM Compilation (.obj)
↓
Linking (.exe / .dll)Troubleshooting
"Could not open file"
Verify the input file path exists and is accessible.
"No output file specified"
Use -o flag to specify output: xxml input.XXML -o output.exe
Linker Errors
Ensure LLVM tools and Visual Studio Build Tools are installed and in PATH.
Standard Library Not Found
Verify Language/ directory exists relative to compiler location with core STL files.
Note
--ir flag to generate LLVM IR and inspect the generated code.Next Steps
Learn about the Import System for module organization, or explore the Compiler Architecture for internals.