--- type: guide order: 3 title: Command line --- zdxc accepts dxc command-line arguments. A compilation can read its input from a file or, through the library interfaces, from memory. | Option | Meaning | | --- | --- | | `-T ` | Target profile, such as `vs_6_0`, `ps_6_0`, or `cs_6_0`. | | `-E ` | Shader entry point. | | `-D ` | Define a preprocessor macro. | | `-I ` | Add an include search directory. | | `-Fo ` | Write the object to a file. | | `-Fi ` | Write preprocessed output when used with `-P`. | | `-Frs ` | Write a root-signature container. | | `-P` | Preprocess instead of compiling. | | `-spirv` | Emit SPIR-V instead of DXIL. | | `-Zpr` / `-Zpc` | Select row- or column-major matrix packing. | | `-O0` … `-O3`, `-Od` | Select the optimization level. | | `--job=` | Compile a JSON batch of shaders in one process. | DXIL is the default backend. Add `-spirv` for SPIR-V, with the `-fvk-*` and `-fspv-*` options controlling Vulkan bindings, layout, and target environment. ## Diagnostics and exit status Diagnostics follow dxc's command-line format. Exit status is 0 for success, 1 for bad options or input/output failures, and 5 for source compilation errors. Warnings can appear in successful compilations.