cmc is a command-line compiler for Windows, Linux and Windows subsystem for Linux. It compiles Cmajor code to LLVM intermediate code that is then compiled to native code using LLVM libraries and tools.
Usage: cmc [options] { project.cmp | solution.cms }
Long option | Short option | IDE command | Description |
---|---|---|---|
--help | -h | Print help and exit. | |
--verbose | -v | Be verbose. | |
--quiet | -q | Be quite, only return exit code. | |
‑‑config=CONFIG | ‑c=CONFIG | Configuration combo box | Build usig CONFIG configuration. CONFIG can be "debug" or "release". Default optimization level for debug build is 0 and for release build is 2. |
‑‑optimization‑level=LEVEL | -O=LEVEL | Set optimization level to LEVEL (0-3). | |
--clean | -e | Build | Clean project/solution | Clean given projects and solutions. |
--strict-nothrow | -s | Build | Options | Strict nothrow | Treat a nothrow violation as an error. |
--emit-llvm | -l | Build | Options | Emit LLVM intermediate code | Emit LLVM intermediate code to .ll files while compiling. |
--emit-opt-llvm | -o | Build | Options | Emit optimized LLVM intermediate code | Emit optimized LLVM intermediate code to .opt.ll files while compiling. |
--link-with-debug-runtime | -d | Build | Options | Link with debug runtime | Link with debug version of the runtime library cmrt2xx(d).dll. |
--link-using-ms-link | -m | Build | Options | Use Microsoft's link.exe as the linker | Use Microsoft's link.exe as the linker. Link.exe must be found from the PATH. If this option not given, uses LLVM's lld-link as the linker. |
--define SYMBOL | -D SYMBOL | Project | Properties | Conditional compilation symbols | Define a conditional compilation symbol SYMBOL. |
--gen-debug-info | -g | Generate debug info (on by default on debug configuration) | |
--no-debug-info | -n | Don't generate debug info even for debug build | |
--build-threads=N | -bt=N | Build | Options | Number of build threads combo box. | Use N threads for building a solution. Default is 2 x C, where C is the number of cores. |
--single-threaded-compile | -st | Compile source files in a project using a single thread. | |
--all | -a | Build all dependencies. |