aboutsummaryrefslogtreecommitdiff
path: root/files/ja/mozilla/projects/spidermonkey/build_documentation/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ja/mozilla/projects/spidermonkey/build_documentation/index.html')
-rw-r--r--files/ja/mozilla/projects/spidermonkey/build_documentation/index.html290
1 files changed, 290 insertions, 0 deletions
diff --git a/files/ja/mozilla/projects/spidermonkey/build_documentation/index.html b/files/ja/mozilla/projects/spidermonkey/build_documentation/index.html
new file mode 100644
index 0000000000..dd5a4146c2
--- /dev/null
+++ b/files/ja/mozilla/projects/spidermonkey/build_documentation/index.html
@@ -0,0 +1,290 @@
+---
+title: SpiderMonkey のビルド
+slug: Mozilla/Projects/SpiderMonkey/Build_Documentation
+tags:
+ - Build documentation
+ - Guide
+ - SpiderMonkey
+translation_of: Mozilla/Projects/SpiderMonkey/Build_Documentation
+---
+<div>{{SpiderMonkeySidebar("General")}}</div>
+
+<h2 id="SpiderMonkey_のビルド">SpiderMonkey のビルド</h2>
+
+<p>この文書は SpiderMonkey の最新版をソースコードからビルドする方法を解説します。</p>
+
+<p><strong>ビルドを始める前に、必要なツールがインストールされていることを確認してください</strong>。<a href="/En/Developer_Guide/Build_Instructions/Linux_Prerequisites" title="en/Linux_Build_Prerequisites">Linux</a>, <a href="/En/Developer_Guide/Build_Instructions/Windows_Prerequisites" title="en/Windows_Build_Prerequisites">Windows</a>, <a href="/En/Developer_Guide/Build_Instructions/Mac_OS_X_Prerequisites" title="en/Mac_OS_X_Build_Prerequisites">Mac</a>, <a href="/En/Developer_Guide/Build_Instructions" title="en/Build_Documentation">その他の環境</a> での準備は、それぞれのドキュメントをごらんください。28 より古いバージョンのビルドをする際は、<a href="/ja/docs/Mozilla/Projects/NSPR">NSPR</a> が追加で必要となります。</p>
+
+<p style="margin: 0px 0px 1.7em; padding: 0px;">また <a class="internal" href="/En/SpiderMonkey/Getting_SpiderMonkey_source_code#Getting_the_latest_SpiderMonkey_source_code" title="En/SpiderMonkey/Getting SpiderMonkey source code#Getting the latest SpiderMonkey source code">SpiderMonkey 最新版のソースコード</a> も必要です。</p>
+
+<h3 id="非開発者向け_(最適化)_ビルド">非開発者向け (最適化) ビルド</h3>
+
+<p>実運用用のために SpiderMonkey をインストールする場合、またはパフォーマンスベンチマークを実行する場合は、これらの手順を使用してください (SpiderMonkey を C++ アプリケーションのライブラリとして使用したい場合、または SpiderMonkey 自体の改善に取り組んでいる場合は、代わりに下記のように開発者/デバッグビルドを行ってください)。</p>
+
+<pre class="eval line-numbers language-html">cd js/src
+autoconf2.13
+
+# この名前は、バージョン管理システムで無視させるために "_OPT.OBJ" で終わる必要があります。
+mkdir build_OPT.OBJ
+cd build_OPT.OBJ
+../configure
+# Windows では "mozmake" を使います。
+make
+</pre>
+
+<p>これについてのいくつかのメモ:</p>
+
+<ul>
+ <li>
+ <p>最も一般的なビルドの問題は依存関係の問題です。<a href="/ja/docs/Mozilla/Developer_Guide/Build_Documentation#Getting_started">プラットフォーム用のビルド前提条件ページ</a>を見てください。</p>
+ </li>
+ <li>
+ <p>SpiderMonkey はソースディレクトリでの構築をサポートしていません。上記のように、別のビルドディレクトリに設定してビルドする必要があります。</p>
+ </li>
+ <li>
+ <p>はい、autoconf バージョン 2.13 が本当に必要です。 それ以降のバージョンは動作しません (ただし、システムの autoconf としてインストールしないでください。これも機能しません。そのバージョンは非常に古いため、お勧めできません)。</p>
+ </li>
+</ul>
+
+<div class="note">
+<p><strong>メモ</strong>: Mac を使用していて、次のようなエラーが表示される場合</p>
+
+<p>"<code>checking whether the C compiler (gcc-4.2  ) works... no<br>
+ configure: error: installation or configuration problem: C compiler cannot create executables.</code>"</p>
+
+<p>次のように設定してみてください。</p>
+
+<pre><code>CC=clang CXX=clang++ ../configure</code></pre>
+
+<p>baldrdash がコンパイルに失敗する可能性もあります。</p>
+
+<pre class="line-numbers language-html"><code class="language-html">/usr/local/Cellar/llvm/7.0.1/lib/clang/7.0.1/include/inttypes.h:30:15: fatal error: 'inttypes.h' file not found
+
+/usr/local/Cellar/llvm/7.0.1/lib/clang/7.0.1/include/inttypes.h:30:15: fatal error: 'inttypes.h' file not found, err: true</code></pre>
+
+<p>これは Mohave 以降、ヘッダーが /usr/include にインストールされなくなったためです。コマンドラインツール -&gt; 新機能の下の<a href="https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes">リリースノート</a>を参照してください。</p>
+
+<p>リリースノートには、この互換性パッケージは近い将来提供されなくなると記載されているので、macOS 上のビルドシステムは SDK のヘッダを探すように適合させる必要があるでしょう。<br>
+ <br>
+ それまでは、次のことが役に立ちます。</p>
+
+<pre><code>open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pk
+</code></pre>
+</div>
+
+<p>これにより <code>build-release/dist/bin</code> ディレクトリに <code>js</code> という実行可能ファイルが構築されます。ヘルプページを表示する <code>dist/bin/js --help</code> でテストできます。これで、<a href="/ja/docs/Mozilla/Projects/SpiderMonkey/Introduction_to_the_JavaScript_shell">シェルを実行して試す</a>準備が整いました。</p>
+
+<p>Mac、Linux、または UNIX では、追加のコマンド <code>make install</code> を使用してシステムに SpiderMonkey をインストールできます。これは共有ライブラリを <code>/usr/local/lib</code> に、C ヘッダファイルを <code>usr/local/include</code> に、そして <code>js</code> 実行ファイルを <code>/usr/local/bin</code> にインストールします。</p>
+
+<h3 id="開発者向け(デバッグ用)ビルド">開発者向け(デバッグ用)ビルド</h3>
+
+<p>SpiderMonkey 自身の開発やデバッグを目的とする場合、日々のデバッグにはデバッグビルドを、パフォーマンステストには最適化ビルドを、それぞれ別のディレクトリで行うことになります。デバッグビルドを行うには、上記の手順に加えて以下の 3 ステップを行います:</p>
+
+<pre class="eval">cd js/src
+autoconf-2.13
+
+# This name should end with "_DBG.OBJ" to make the version control system ignore it.
+mkdir build_DBG.OBJ
+cd build_DBG.OBJ
+../configure --enable-debug --disable-optimize
+# Use "mozmake" on Windows
+make
+</pre>
+
+<p><code>JS_GC_ZEAL</code> オプションをつけてビルドすると、zealous ガベージコレクションが有効になります。これはメモリリークに代表されるメモリ関連のデバッグを行う時に有用です。詳細は <a class="internal" href="/SpiderMonkey/JSAPI_Reference/JS_SetGCZeal" title="En/SpiderMonkey/JSAPI Reference/JS SetGCZeal"><code>JS_SetGCZeal()</code></a> をご覧ください。</p>
+
+<p>この他のビルドオプションについては、上記で作成したビルドディレクトリ内で次のコマンドを実行してください:</p>
+
+<pre class="eval">../configure --help
+</pre>
+
+<h4 id="コンパイルデータベースの生成">コンパイルデータベースの生成</h4>
+
+<p>一部のツール (IDE、静的アナライザー、リファクタリングツールなど) は、ソフトウェアを構築するために必要なすべての要素の説明を含む <code><a href="https://clang.llvm.org/docs/JSONCompilationDatabase.html">compile_commands.json</a></code> というファイルを使用するため、ツールは構築システムも理解する必要はありません。</p>
+
+<p>SpiderMonkey 設定スクリプトを使用して <code>compile_commands.json</code> を生成するには、次のように CompileDB バックエンドを有効にします。</p>
+
+<pre class="syntaxbox"> ../configure &lt;options&gt; --enable-build-backends=CompileDB,RecursiveMake
+</pre>
+
+<p>(RecursiveMake はあなたもビルドできるようになりたいと思うのでそこにあります!)</p>
+
+<h3 id="Building" name="Building">Windows でのビルド</h3>
+
+<div class="note">
+<p>バージョン 28 以降、<strong>スレッドセーフビルドがデフォルト</strong>となり、すべての POSIX プラットフォームでそのまま使用できるはずです。したがって、次の手順は Windows を使用している場合、または古いバージョンの SpiderMonkey をコンパイルしている場合にのみ関係があります。</p>
+</div>
+
+<p>The <a href="https://wiki.mozilla.org/MozillaBuild">MozillaBuild</a> batch file you used to open your shell (e.g. <code>start-shell-msvc2013.bat</code> or <code>start-shell-msvc2013-x64.bat</code>) determines whether the compiler toolchain will target 32-bit or 64-bit builds. To create a 64-bit build, note that you must configure with <code>--target=x86_64-pc-mingw32 --host=x86_64-pc-mingw32</code>.</p>
+
+<p>Since the POSIX NSPR emulation is not available for Windows, a working version of NSPR must be available to your build. <strong>The easiest option is to configure with <code>--enable-nspr-build.</code></strong><code> </code>This configure option builds the in-tree version of NSPR which is probably what you want; <span style="line-height: normal;"><span style="line-height: normal;">because SpiderMonkey uses newer NSPR symbols, the NSPR that ships with your operating system probably does not work.</span></span></p>
+
+<p>If <code>--enable-nspr-build</code> does not work, explicitly tell <code>configure</code> where to find NSPR using the <code>--with-nspr-cflags</code> and <code>--with-nspr-libs</code> configure options. For example, assuming your local NSPR has been installed to <code>C:/mozilla-build/msys/local</code>:</p>
+
+<pre><span style="line-height: normal;"><code><span style="line-height: normal;"><code><code>./configure<code> --with-nspr-cflags="-IC:/mozilla-build/msys/local/include" \
+     --with-nspr-libs="<span style="line-height: normal;"><code><span style="line-height: normal;"><code><code><code>C:/mozilla-build/msys/local</code></code></code></span></code></span>/lib/libnspr4.a \
+ <span style="line-height: normal;"><code><span style="line-height: normal;"><code><code><code>C:/mozilla-build/msys/local</code></code></code></span></code></span>/lib/libplds4.a \
+ <span style="line-height: normal;"><code><span style="line-height: normal;"><code><code><code>C:/mozilla-build/msys/local</code></code></code></span></code></span>/lib/libplc4.a"</code>
+</code></code></span></code></span></pre>
+
+<p>If you get symbol loading or dynamic library errors, you can force the correct NSPR to load with:</p>
+
+<pre class="line-numbers language-html"><code class="language-html">PATH="$PATH;C:/mozilla-build/msys/local/lib/" ./js</code></pre>
+
+<h2 id="Specifying_installation_directories">Specifying installation directories</h2>
+
+<p><code>make install</code> puts files in the following directories by default. You can override this by passing options to the <code>configure</code> script:</p>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th>What it is</th>
+ <th>Where it gets put</th>
+ <th><code>configure</code> option</th>
+ </tr>
+ <tr>
+ <td>executables, shell scripts</td>
+ <td><code>/usr/local/bin</code></td>
+ <td><code>--bindir</code></td>
+ </tr>
+ <tr>
+ <td>libraries, data</td>
+ <td><code>/usr/local/lib</code></td>
+ <td><code>--libdir</code></td>
+ </tr>
+ <tr>
+ <td>architecture-independent data</td>
+ <td><code>/usr/local/share</code></td>
+ <td><code>--sharedir</code></td>
+ </tr>
+ <tr>
+ <td>C header files</td>
+ <td><code>/usr/local/include</code></td>
+ <td><code>--includedir</code></td>
+ </tr>
+ </tbody>
+</table>
+
+<p>For convenience, you can pass the <code>configure</code> script an option of the form <code>--prefix=&lt;PREFIXDIR&gt;</code>, which substitutes <code>&lt;PREFIXDIR&gt;</code> for <code>/usr/local</code> in all the settings above, in one step. This is usually the least troublesome thing to do, as it preserves the typical arrangement of <code>lib</code>, <code>bin</code>, and the rest.</p>
+
+<div class="note"><strong>Note:</strong> All directories you pass to <code>configure</code> are recorded in the generated makefile, so you don't need to specify them again until you re-run <code>configure</code>.</div>
+
+<h2 id="Building_SpiderMonkey_as_a_static_library">Building SpiderMonkey as a static library</h2>
+
+<p>By default, SpiderMonkey builds as a shared library. However, you can build SpiderMonkey as a static library by specifying the <code>--disable-shared-js</code> flag when you run <code>configure</code>.</p>
+
+<h2 id="Specifying_compilers_and_compiler_flags">Specifying compilers and compiler flags</h2>
+
+<p>If you want to use a compiler other than the one the <code>configure</code> script chooses for you by default, you can set the <code>CXX</code> variable in the environment when you run <code>configure</code>. This will save the values you specify in the generated makefile, so once you've set it, you don't need to do so again until you re-run <code>configure</code>.</p>
+
+<p>If you'd like to pass certain flags to the compiler, you can set the <code>CXXFLAGS</code> environment variable when you run <code>configure</code>. For example, if you're using the GNU toolchain, the following will pass the <code>-g3</code> flag to the compiler, causing it to emit debug information about macros. Then you can use those macros in <code>gdb</code> commands:</p>
+
+<pre class="eval line-numbers language-html"><code class="language-html">$ CXXFLAGS=-g3 $SRC/configure
+...
+checking whether the C++ compiler (c++ -g3 ) works... yes
+...
+$</code></pre>
+
+<h2 id="Cross-compiling_options">Cross-compiling options</h2>
+
+<p>For cross-compiling you will need a cross-compiling compiler. That tends to be easier with clang as clang has cross-compiling support built in. You may need other libraries though.  For example on debian linux you'll need the following to cross compile from x86_64 to x86.</p>
+
+<pre class="syntaxbox">apt install clang libstdc++-8-dev-i386-cross binutils-i686-gnu zlib1g-dev:i386</pre>
+
+<p>You'll also need rust, in addition to having normal rust set up you'll need to add another target to your existing rust toolchain (don't add a new toolchain spidermonkey will use only one toolchain and use it for both host and target code:</p>
+
+<pre class="syntaxbox">rustup target add i686-unknown-linux-gnu</pre>
+
+<p>To build a 32-bit version on a 64-bit Linux system, you can use the following:</p>
+
+<pre class="eval line-numbers language-html"><code class="language-html">PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig CC="gcc -m32 -mfpmath=sse -msse -msse2" CXX="g++ -m32 -mfpmath=sse -msse -msse2" AR=ar \
+$SRC/configure --target=i686-pc-linux</code></pre>
+
+<p>Or for clang.</p>
+
+<pre class="syntaxbox">$SRC/configure --target=i686-pc-linux-gnu</pre>
+
+<p>To build a 32-bit arm version on a 64-bit Linux system, that runs in the arm simulator, you can use the following:</p>
+
+<pre class="line-numbers language-html"><code class="language-html"> AR=ar CC="gcc -m32 -mfpmath=sse -msse -msse2" CXX="g++ -m32 -mfpmath=sse -msse -msse2" \
+ $SRC/configure --target=i686-pc-linux --enable-simulator=arm</code></pre>
+
+<p>To build a 32-bit version on a 64-bit Mac system (the target version is specific to your OS/X SDK), you can use the following:</p>
+
+<pre class="syntaxbox">$SRC/configure --target=i386-apple-darwin16.7.0 # Choose the appropriate SDK version for your version of OS/X</pre>
+
+<p>To build a 64-bit version on a 32-bit Mac system (e.g. Mac OS X 10.5), you can use the following:</p>
+
+<pre class="eval line-numbers language-html"><code class="language-html">AR=ar CC="gcc -m64" CXX="g++ -m64" ../configure --target=x86_64-apple-darwin10.0.0</code></pre>
+
+<p>To build a 64-bit Windows version, you can use the following:</p>
+
+<pre class="eval line-numbers language-html"><code class="language-html">$SRC/configure --host=x86_64-pc-mingw32 --target=x86_64-pc-mingw32</code></pre>
+
+<div class="note"><strong>Note:</strong> You must have started your MozillaBuild shell with the proper -x64.bat script in order for the 64-bit compilers to be in your PATH.</div>
+
+<p>Whatever compiler and flags you pass to <code>configure</code> are recorded in the generated makefile, so you don't need to specify them again until you re-run <code>configure</code>.</p>
+
+<h2 id="Building_your_application">Building your application</h2>
+
+<p>While "How to build your complete application" is clearly out of scope for this document, here are some tips that will help get you on your way:</p>
+
+<ul>
+ <li>The SpiderMonkey developers frequently and deliberately change the JSAPI ABI. You cannot use headers built for one version/configuration of JSAPI to create object files which will be linked against another.</li>
+ <li>Support for JS_THREADSAFE was recently removed, and threadsafe builds are now enabled by default.</li>
+ <li>The <code>js-config</code> script, described below, is the recommended way to determine correct include paths, required libraries, etc. for your embedding to use during compilation. We highly recommend calling the <code>js-config</code> script from your embedding's makefile to set your CFLAGS, LDFLAGS, and so forth.</li>
+ <li>To install SpiderMonkey somewhere other than the default, you must use the <code>configure</code> <code>--prefix</code> option, as described above. Failure to do so may break your <code>js-config.h</code> header or <code>js-config</code> script.</li>
+ <li>Some features detected by the <code>configure</code> script do not work for cross-compilation.</li>
+</ul>
+
+<h3 id="Using_the_js-config_script">Using the js-config script</h3>
+
+<p>In addition to the SpiderMonkey libraries, header files, and shell, the SpiderMonkey build also produces a shell script named <code>js-config</code> which other build systems can use to find out how to compile code using the SpiderMonkey APIs, and how to link with the SpiderMonkey libraries.</p>
+
+<div class="note"><strong>Note:</strong> In SpiderMonkey 1.8.5, the js-config script is not generated properly on many platforms. If the instructions below do not work, you can try this <a href="https://developer.mozilla.org/en/SpiderMonkey/1.8.5#js-config" title="https://developer.mozilla.org/en/SpiderMonkey/1.8.5#js-config">workaround</a>.</div>
+
+<p>When invoked with the <code>--cflags</code> option, <code>js-config</code> prints the flags that you should pass to the C compiler when compiling files that use the SpiderMonkey API. These flags ensure the compiler will find the SpiderMonkey header files.</p>
+
+<pre class="eval line-numbers language-html"><code class="language-html">$ ./js-config --cflags # Example output: -I/usr/local/include/js -I/usr/include/nspr</code></pre>
+
+<p>When invoked with the <code>--libs</code> option, <code>js-config</code> prints the flags that you should pass to the C compiler when linking an executable or shared library that uses SpiderMonkey. These flags ensure the compiler will find the SpiderMonkey libraries, along with any libraries that SpiderMonkey itself depends upon (like NSPR).</p>
+
+<pre class="eval line-numbers language-html"><code class="language-html">$ ./js-config --libs # Example output: -L/usr/local/lib -lmozjs -L/usr/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl -ldl -lm -lm -ldl</code></pre>
+
+<h2 id="Test" name="Test">Testing SpiderMonkey</h2>
+
+<ul>
+ <li>
+ <p>Run <code>${BUILDDIR}/dist/bin/js </code><code>Y.js</code> and check if appropriate output is printed. (It should say: <code>5! is 120</code>.)</p>
+ </li>
+ <li>
+ <p>Run the main test suite by running <code>./tests/jstests.py ${BUILDDIR}/dist/bin/js</code></p>
+ </li>
+ <li>
+ <p>Run JIT-specific tests by running: <code>./jit-test/jit_test.py ${BUILDDIR}/dist/bin/js</code></p>
+ </li>
+</ul>
+
+<h2 id="Building_SpiderMonkey_1.8_or_earlier">Building SpiderMonkey 1.8 or earlier</h2>
+
+<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.286em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;">Use these instructions to build SpiderMonkey from an official source release or from the old CVS repository. To build the latest SpiderMonkey sources from Mercurial, see <a href="https://developer.mozilla.org/ja/docs/Mozilla/Projects/SpiderMonkey/Build_Documentation$edit#Building_SpiderMonkey_tip" style="text-decoration: none; color: rgb(51, 102, 153) !important; cursor: default;">Building SpiderMonkey </a>above.</p>
+
+<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.286em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"><a href="https://developer.mozilla.org/en/SpiderMonkey" style="text-decoration: none; color: rgb(51, 102, 153) !important; cursor: default;" title="en/SpiderMonkey">SpiderMonkey</a> is easy to build from source if you have the usual Mozilla build prerequisites installed. Before you begin, make sure you have right build tools for your computer: <a href="https://developer.mozilla.org/en/Developer_Guide/Build_Instructions/Linux_Prerequisites" style="text-decoration: none; color: rgb(51, 102, 153) !important; cursor: default;" title="en/Linux_Build_Prerequisites">Linux</a>, <a href="https://developer.mozilla.org/en/Developer_Guide/Build_Instructions/Windows_Prerequisites" style="text-decoration: none; color: rgb(51, 102, 153) !important; cursor: default;" title="en/Windows_Build_Prerequisites">Windows</a>, <a href="https://developer.mozilla.org/en/Developer_Guide/Build_Instructions/Mac_OS_X_Prerequisites" style="text-decoration: none; color: rgb(51, 102, 153) !important; cursor: default;" title="en/Mac_OS_X_Build_Prerequisites">Mac</a>, <a href="https://developer.mozilla.org/en/Developer_Guide/Build_Instructions" style="text-decoration: none; color: rgb(51, 102, 153) !important; cursor: default;" title="en/Build_Documentation">others</a>.</p>
+
+<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.286em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;">First, download a SpiderMonkey source distribution, such as <a class="external external-icon" href="http://ftp.mozilla.org/pub/mozilla.org/js/js-1.8.0-rc1.tar.gz" style="text-decoration: none; color: rgb(51, 102, 153) !important; cursor: default;">SpiderMonkey 1.8 Release Candidate 1</a>.</p>
+
+<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.286em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;">To build, use these commands:</p>
+
+<pre class="eval line-numbers language-html" style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.286em; margin-left: 0px; padding-top: 15px; padding-right: 15px; padding-bottom: 15px; padding-left: 15px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dotted; border-right-style: dotted; border-bottom-style: dotted; border-left-style: dotted; background-clip: initial; background-color: rgb(246, 246, 242); font: normal normal normal 100%/normal 'Courier New', 'Andale Mono', monospace;"><code class="language-html">tar xvzf js-1.8.0-rc1.tar.gz
+cd js/src
+make -f Makefile.ref</code></pre>
+
+<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.286em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;">This builds a debug version of SpiderMonkey. All build files are created in a subdirectory named depending on your system (for example,<code style="font: normal normal normal 100%/normal 'Courier New', 'Andale Mono', monospace; color: inherit; font-weight: inherit;">Linux_All_DBG.OBJ</code> if you are on Linux). To install this build on your system, see <a class="external external-icon" href="http://ebixio.com/blog/2010/07/31/how-to-install-libjs-spidermonkey/" style="text-decoration: none; color: rgb(51, 102, 153) !important; cursor: default;" title="http://ebixio.com/blog/2010/07/31/how-to-install-libjs-spidermonkey/">SpiderMonkey installation instructions</a>.</p>
+
+<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.286em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;">To build an optimized (non-debug) version of SpiderMonkey:</p>
+
+<pre class="eval line-numbers language-html" style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.286em; margin-left: 0px; padding-top: 15px; padding-right: 15px; padding-bottom: 15px; padding-left: 15px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dotted; border-right-style: dotted; border-bottom-style: dotted; border-left-style: dotted; background-clip: initial; background-color: rgb(246, 246, 242); font: normal normal normal 100%/normal 'Courier New', 'Andale Mono', monospace;"><code class="language-html">make BUILD_OPT=1 -f Makefile.ref</code></pre>
+
+<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.286em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;">To build a <a href="https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JS_THREADSAFE" style="text-decoration: none; color: rgb(51, 102, 153) !important; cursor: default;" title="JS_THREADSAFE">thread-safe</a> version of SpiderMonkey:</p>
+
+<pre class="eval line-numbers language-html" style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.286em; margin-left: 0px; padding-top: 15px; padding-right: 15px; padding-bottom: 15px; padding-left: 15px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dotted; border-right-style: dotted; border-bottom-style: dotted; border-left-style: dotted; background-clip: initial; background-color: rgb(246, 246, 242); font: normal normal normal 100%/normal 'Courier New', 'Andale Mono', monospace;"><code class="language-html">make JS_DIST=/full/path/to/directory/containing/nspr JS_THREADSAFE=1 -f Makefile.ref</code></pre>