A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.erlang.org/doc/apps/erts/erlc_cmd below:

erlc — erts v16.0.1

Compiler

Description

The erlc program provides a common way to run all compilers in the Erlang system. Depending on the extension of each input file, erlc invokes the appropriate compiler. Regardless of which compiler is used, the same flags are used to provide parameters, such as include paths and output directory.

The current working directory, ".", is not included in the code path when running the compiler. This is to avoid loading Beam files from the current working directory that could potentially be in conflict with the compiler or the Erlang/OTP system used by the compiler.

erlc flags file1.ext file2.ext...

Compiles one or more files. The files must include the extension, for example, .erl for Erlang source code, or .yrl for Yecc source code. Erlc uses the extension to invoke the correct compiler.

Generally Useful Flags

The following flags are supported:

Special Flags

The following flags are useful in special situations, such as rebuilding the OTP system:

Supported Compilers

The following compilers are supported:

Compile Server

The compile server can be used to potentially speed up the build of multi-file projects by avoiding to start an Erlang system for each file to compile. Whether it will speed up the build depends on the nature of the project and the build machine.

By default, the compile server is not used. It can be enabled by giving erlc the option -server or by setting the environment variable ERLC_USE_SERVER to yes or true.

When the compile server is enabled, erlc will automatically use the server if it is started and start the server if has not already started. The server will terminate itself when it has been idle for some number of seconds.

erlc and the compile server communicate using the Erlang distribution. The compile server is started as a hidden node, with a name that includes the current user. Thus, each user on a computer has their own compile server.

Using the compile server does not always speed up the build, as the compile server sometimes must be restarted to ensure correctness. Here are some examples of situations that force a restart:

Environment Variables See Also

erl(1), compile, yecc, snmp


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4