table of contents
LDC(1) | User Commands | LDC(1) |
NAME¶
LDC - manual page for LDC LLVM D compiler (1.39.0):
DESCRIPTION¶
LDC - the LLVM D compiler (1.39.0):¶
- based on DMD v2.109.1 and LLVM 18.1.8 built with LDC - the LLVM D compiler (1.39.0) Default target: x86_64-suse-linux Host CPU: (unknown) http://dlang.org - http://wiki.dlang.org/LDC
- Registered Targets:
- aarch64
- - AArch64 (little endian)
- aarch64_32
- - AArch64 (little endian ILP32)
- aarch64_be
- - AArch64 (big endian)
- amdgcn
- - AMD GCN GPUs
- arm
- - ARM
- arm64
- - ARM64 (little endian)
- arm64_32
- - ARM64 (little endian ILP32)
- armeb
- - ARM (big endian)
- avr
- - Atmel AVR Microcontroller
- bpf
- - BPF (host endian)
- bpfeb
- - BPF (big endian)
- bpfel
- - BPF (little endian)
- hexagon
- - Hexagon
- lanai
- - Lanai
- loongarch32 - 32-bit LoongArch loongarch64 - 64-bit LoongArch m68k - Motorola 68000 family mips - MIPS (32-bit big endian) mips64 - MIPS (64-bit big endian) mips64el - MIPS (64-bit little endian) mipsel - MIPS (32-bit little endian) msp430 - MSP430 [experimental] nvptx - NVIDIA PTX 32-bit nvptx64 - NVIDIA PTX 64-bit ppc32 - PowerPC 32 ppc32le - PowerPC 32 LE ppc64 - PowerPC 64 ppc64le - PowerPC 64 LE r600 - AMD GPUs HD2XXX-HD6XXX riscv32 - 32-bit RISC-V riscv64 - 64-bit RISC-V sparc - Sparc sparcel - Sparc LE sparcv9 - Sparc V9 systemz - SystemZ thumb - Thumb thumbeb - Thumb (big endian) ve - VE wasm32 - WebAssembly 32-bit wasm64 - WebAssembly 64-bit x86 - 32-bit X86: Pentium-Pro and above x86-64 - 64-bit X86: EM64T and AMD64 xcore - XCore
Usage:¶
- /home/abuild/rpmbuild/BUILDROOT/ldc-1.39.0-1.1.x86_64/usr/bin/ldmd2 [<option>...] <file>... /home/abuild/rpmbuild/BUILDROOT/ldc-1.39.0-1.1.x86_64/usr/bin/ldmd2 [<option>...] -run <file> [<arg>...]
Where:¶
- <file>
- D source file
- <arg>
- Argument to pass when running the resulting program
<option>:¶
- @<cmdfile>
- read arguments from cmdfile
- -allinst
- generate code for all template instantiations
- -betterC
- omit generating some runtime information and helper functions
- -boundscheck=[on|safeonly|off]
- bounds checks on, in @safe only, or off
- -c
- compile only, do not link
- -check=[assert|bounds|in|invariant|out|switch][=[on|off]]
- enable or disable specific checks
- -checkaction=[D|C|halt|context]
- behavior on assert/boundscheck/finalswitch failure
- -color
- turn colored console output on
- -color=[on|off|auto]
- force colored console output on or off, or only when not redirected (default)
- -conf=<filename>
- use config file at filename
- -cov
- do code coverage analysis
- -cov=ctfe
- include code executed during CTFE in coverage report
- -cov=<nnn>
- require at least nnn% code coverage
- -D
- generate documentation
- -Dd<directory>
- write documentation file to directory
- -Df<filename>
- write documentation file to filename
- -d
- silently allow deprecated features and symbols
- -de
- issue an error when deprecated features or symbols are used (halt compilation)
- -dw
- issue a message when deprecated features or symbols are used (default)
- -debug
- compile in debug code
- -debug=<level>
- compile in debug code <= level
- -debug=<ident>
- compile in debug code identified by ident
- -debuglib=<name>
- set symbolic debug library to name
- -defaultlib=<name>
- set default library to name
- -deps
- print module dependencies (imports/file/version/debug/lib)
- -deps=<filename>
- write module dependencies to filename (only imports)
- -dllimport=<value>
- Windows only: select symbols to dllimport (none/defaultLibsOnly/all)
- -extern-std=<standard>
- set C++ name mangling compatibility with <standard>
- -fIBT
- generate Indirect Branch Tracking code
- -fPIC
- generate position independent code
- -g
- add symbolic debug info
-gdwarf=<version> add DWARF symbolic debug info
- -gf
- emit debug info for all referenced types
- -gs
- always emit stack frame
- -H
- generate 'header' file
- -Hd=<directory>
- write 'header' file to directory
- -Hf=<filename>
- write 'header' file to filename
- -HC[=[silent|verbose]]
- write C++ 'header' equivalent to stdout
- -HCd=<directory>
- write C++ 'header' file to directory
- -HCf=<filename>
- write C++ 'header' file to filename instead of stdout
- --help
- print help and exit
- -I=<directory>
- look for imports also in directory
- -i[=<pattern>]
- include imported modules in the compilation
- -identifiers=<table>
- specify the non-ASCII tables for D identifiers
- -identifiers-importc=<table>
- specify the non-ASCII tables for ImportC identifiers
- -ignore
- deprecated flag, unsupported pragmas are always ignored now
- -inline
- do function inlining
- -J=<directory>
- look for string imports also in directory
- -L=<linkerflag>
- pass linkerflag to link
- -lib
- generate library rather than object files
- -lowmem
- enable garbage collection for the compiler
- -m32
- generate 32 bit code
- -m64
- generate 64 bit code
- -main
- add default main() if not present already (e.g. for unittesting)
- -makedeps[=<filename>]
- print dependencies in Makefile compatible format to filename or stdout
- -man
- open web browser on manual page
- -mcpu=<id>
- generate instructions for architecture identified by 'id'
- -mcpu=[h|help|?]
- list all architecture options
-mixin=<filename> expand and save mixins to file specified by <filename>
- -mscrtlib=<libname>
- MS C runtime library to reference from main/WinMain/DllMain
- -mv=<package.module>=<filespec>
- use <filespec> as source file for <package.module>
- -noboundscheck
- no array bounds checking (deprecated, use -boundscheck=off)
- -nothrow
- assume no Exceptions will be thrown
- -O
- optimize
- -o-
- do not write object file
- -od=<directory>
- write object & library files to directory
- -of=<filename>
- name output file to filename
- -op
- preserve source path for output files
- -P=<preprocessorflag>
- pass preprocessorflag to C preprocessor
- -preview=<name>
- enable an upcoming language change identified by 'name'
- -preview=[h|help|?]
- list all upcoming language changes
- -profile
- profile runtime performance of generated code
- -release
- contracts and asserts are not emitted, and bounds checking is performed only in @safe functions
- -revert=<name>
- revert language change identified by 'name'
- -revert=[h|help|?]
- list all revertable language changes
- -run <srcfile>
- compile, link, and run the program srcfile
- generate shared library (DLL)
- -target=<triple>
- use <triple> as <arch>-[<vendor>-]<os>[-<cenv>[-<cppenv]]
- -transition=<name>
- help with language change identified by 'name'
- -transition=[h|help|?]
- list all language changes
- -unittest
- compile in unit tests
- -v
- verbose
- -vasm
- generate additional textual assembly files (*.s)
- -vcolumns
- print character (column) numbers in diagnostics
- -vdmd
- print the underlying LDC command line
- -verror-style=[digitalmars|gnu]
- set the style for file/line number annotations on compiler messages
- -verror-supplements=<num>
- limit the number of supplemental messages for each error (0 means unlimited)
- -verrors=<num>
- limit the number of error messages (0 means unlimited)
- -verrors=context
- show error messages with the context of the erroring source line
- -verrors=spec
- show errors from speculative compiles such as __traits(compiles,...)
- --version
- print compiler version and exit
- -version=<level>
- compile in version code >= level
- -version=<ident>
- compile in version code identified by ident
- -vgc
- list all gc allocations including hidden ones
- -visibility=<value>
- default visibility of symbols (default/hidden/public)
- -vtemplates=[list-instances]
- list statistics on template instantiations
- -vtls
- list all variables going into thread local storage
- -w
- warnings as errors (compilation will halt)
- -wi
- warnings as messages (compilation will continue)
- -X
- generate JSON file
- -Xf=<filename>
- write JSON file to filename
-Xcc=<driverflag> pass driverflag to linker driver (cc)
- based on DMD v2.109.1 and LLVM 18.1.8 built with LDC - the LLVM D compiler (1.39.0) Default target: x86_64-suse-linux Host CPU: (unknown) http://dlang.org - http://wiki.dlang.org/LDC
- Registered Targets:
- aarch64
- - AArch64 (little endian)
- aarch64_32
- - AArch64 (little endian ILP32)
- aarch64_be
- - AArch64 (big endian)
- amdgcn
- - AMD GCN GPUs
- arm
- - ARM
- arm64
- - ARM64 (little endian)
- arm64_32
- - ARM64 (little endian ILP32)
- armeb
- - ARM (big endian)
- avr
- - Atmel AVR Microcontroller
- bpf
- - BPF (host endian)
- bpfeb
- - BPF (big endian)
- bpfel
- - BPF (little endian)
- hexagon
- - Hexagon
- lanai
- - Lanai
- loongarch32 - 32-bit LoongArch loongarch64 - 64-bit LoongArch m68k - Motorola 68000 family mips - MIPS (32-bit big endian) mips64 - MIPS (64-bit big endian) mips64el - MIPS (64-bit little endian) mipsel - MIPS (32-bit little endian) msp430 - MSP430 [experimental] nvptx - NVIDIA PTX 32-bit nvptx64 - NVIDIA PTX 64-bit ppc32 - PowerPC 32 ppc32le - PowerPC 32 LE ppc64 - PowerPC 64 ppc64le - PowerPC 64 LE r600 - AMD GPUs HD2XXX-HD6XXX riscv32 - 32-bit RISC-V riscv64 - 64-bit RISC-V sparc - Sparc sparcel - Sparc LE sparcv9 - Sparc V9 systemz - SystemZ thumb - Thumb thumbeb - Thumb (big endian) ve - VE wasm32 - WebAssembly 32-bit wasm64 - WebAssembly 64-bit x86 - 32-bit X86: Pentium-Pro and above x86-64 - 64-bit X86: EM64T and AMD64 xcore - XCore
SEE ALSO¶
The full documentation for LDC is maintained as a Texinfo manual. If the info and LDC programs are properly installed at your site, the command
- info LDC
should give you access to the complete manual.
September 2024 | the LLVM D compiler (1.39.0): |