View Source mix compile.erlang (Mix v1.16.0)

Compiles Erlang source files.

When this task runs, it will first check the modification times of all files to be compiled and if they haven't been changed since the last compilation, it will not compile them. If any of them have changed, it compiles everything.

Command line options

  • --all-warnings (--no-all-warnings) - prints all warnings, including previous compilations (default is true except on errors)
  • --force - forces compilation regardless of modification times

Configuration

  • ERL_COMPILER_OPTIONS - can be used to give default compile options. The value must be a valid Erlang term. If the value is a list, it will be used as is. If it is not a list, it will be put into a list.

  • :erlc_paths - directories to find source files. Defaults to ["src"].

  • :erlc_include_path - directory for adding include files. Defaults to "include".

  • :erlc_options - compilation options that apply to Erlang's compiler. Defaults to [].

    For a complete list of options, see :compile.file/2. The option :debug_info is always added to the end of it. You can disable that using:

    erlc_options: [debug_info: false]