Compiler toolchain and resources
Nexus Pascal uses external LLVM tools on its supported little-endian targets. Make the selected tools available on PATH, or select their paths explicitly in the project and Nexus Build environment.
Assembly and linking
The default assembler driver is Clang: -Aas-clang for non-Apple targets and
-Aclang for Apple targets. Pascal Intel/AT&T inline assembly and the internal
ELF/PE-COFF object writers remain available. Executable linking is external.
Linux and Darwin select LLD by default (ld.lld and ld64.lld). -XLL selects
that default explicitly; -XLL- selects the explicit ld override. Windows
uses the PE/COFF toolchain and retains import-library generation.
Linux preserves explicit versioned shared-library filenames from Pascal
external declarations and {$linklib} directives. For example,
external 'libX11.so.6' links that ABI without requiring libX11.so.
Explicit :filename lookup accepts an unversioned filename or a quoted path.
Bare names retain ordinary shared/static archive selection. An unavailable
requested ABI fails instead of silently selecting another. Exact .nxpl
lookup is supported.
Use -g or -gw3/-gw4/-gw5 for DWARF and -gl for runtime source locations.
Resource compilation
Resource scripts compile through explicit target-aware Clang preprocessing and
llvm-rc. Windows links receive normalized RES inputs through LLD. ELF and
Mach-O resources use FPC runtime tables emitted through LLVM assembly.
Resources are embedded; -Wi is accepted for Apple embedded resources.
The resource toolchain baseline is LLVM 18.1.3. Clang and llvm-rc must be on
PATH alongside the assembler/linker tools unless explicitly selected:
| Option | Meaning |
|---|---|
-FC<path> |
Select llvm-rc |
--resource-clang=<path> |
Select Clang |
--resource-include=<directory> |
Add an RC include path |
--resource-define=<name[=value]> |
Define an RC preprocessing symbol |
--resource-undefine=<name> |
Undefine an RC preprocessing symbol |
--resource-codepage=<number> |
Select the RC input encoding |
Defines and undefines retain their order. Pascal -d defines are not copied
into RC preprocessing. Supply SDK header paths explicitly when required.
Each RC compilation uses one encoding: UTF-8 by default, or the selected
codepage. Matching #pragma code_page directives are allowed; conflicting
ones fail at their source location. Split scripts that need different encodings
into separate resource inputs.
Distribute generated <unit>.nxr<index>.res files beside their NXUs.
Source-hidden consumers use those files without invoking RC tools.
Source-present units refresh resources on each owning compiler invocation,
including binary payload changes; unchanged resources retain their timestamps.
Changing recorded RC configuration requires rebuilding the unit. An outer build
must not skip the compiler solely because Pascal timestamps are unchanged.
Supported option boundaries
Nexus Pascal does not accept options for facilities outside its supported target model:
| Facility | Unsupported selections |
|---|---|
| Big-endian code generation | -Cb, -Cb+, -Cb- |
| ISO and Extended Pascal language modes | -Miso, {$mode iso}, -Mextendedpascal, {$mode extendedpascal} |
| Targets without floating-point support | -CfNONE, {$FPUTYPE NONE} |
| Internal executable linker | -Xi, -Xi+, -Xe-; -Xe and -Xi- select external linking |
| OMF and OMF debug data | -Aomf, -gm, -godwarfomflinnum |
| STABS/STABX | -gs, -gp, -gostabsabsincludes |
| Java/JVM-specific naming | {$namespace ...}, -CTautogetterprefix=..., -CTautosetterprefix=..., -CTlowercaseprocstart |
| Standalone resource outputs | -FF, -FR, -We |
Pascal unit scopes still use {$namespaces ...} and -FN. Android JNI and
native Objective-C/C++ support remain available. Network-byte-order and other
data-format conversions are independent of target byte order.
Compiler-injected System, language/runtime, -Fa autoload and startup-unit
dependencies use the same sequential loader as explicit uses entries.
Source and cached units follow the same dependency rules. See the
runtime package guide for compatibility and
package ownership.