LoginSignup
8
2

Erlangのコンパイルオプション/パラメータをまとめて確認したい

Posted at

はじめに

Erlangには大量のコンパイルオプション/パラメータがあります。ErlangVMのチューニングや細かいセッティングをする際には、これらのオプションが重要になってきます。

ただ、どの様なオプションや環境変数があるのかについてまとまったドキュメントは公式のドキュメントくらいしかありません。

もし手元にErlangのソースコードがあれば、configureからオプションやパラメータをまとめて出力できるので、いざという時のために覚えておくと良いでしょう。

確認コマンド

Erlangのソースコードをgit cloneして、configureを以下の様にhelp指定で実行してみてください。

./configure --help=r
〜略(各パッケージのオプション/パラメータなど)〜

また、特定のパッケージに関するオプションを確認したい場合は、以下のディレクトリに入ってからconfigure --helpすれば、そのパッケージに関するヘルプ(とオプション)が確認できます。

例えば、wxに関するオプションを確認したい場合は、lib/wxにはいってから、configure --helpすればOKです。

$ cd lib/wx
$ ./configure --help
`configure' configures this package to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

〜略〜

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data 

〜略〜

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  CPP         C preprocessor

〜略〜
$

まとめ

ビルド時のパラメータや環境変数、オプションを知りたい場合は、この方法を知っておくと確認が簡単にできます。

8
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
2