remove 'mode: xml' emacs settings (#2208)
[ghc-hetmet.git] / docs / users_guide / phases.xml
index 2026a34..abe96b3 100644 (file)
@@ -543,31 +543,6 @@ $ cat foo.hspp</screen>
     </variablelist>
   </sect2>
 
-  <sect2 id="options-C-compiler">
-    <title>Options affecting the C compiler (if applicable)</title>
-
-    <indexterm><primary>include-file options</primary></indexterm>
-    <indexterm><primary>C compiler options</primary></indexterm>
-    <indexterm><primary>GCC options</primary></indexterm>
-
-    <para>If you are compiling with lots of foreign calls, you may
-    need to tell the C&nbsp;compiler about some
-    <literal>&num;include</literal> files.  The Right Way to do this is to
-      add an <literal>INCLUDE</literal> pragma to the top of your source file
-      (<xref linkend="include-pragma" />):</para>
-
-<programlisting>{-# INCLUDE &lt;X/Xlib.h&gt; #-}</programlisting>
-      
-    <para>Sometimes this isn't convenient.  In those cases there's an
-      equivalent command-line option:</para>
-
-<screen>% ghc -c '-#include &lt;X/Xlib.h&gt;' Xstuff.lhs</screen>
-
-    <indexterm><primary><option>-#include</option></primary>
-    </indexterm>
-
-  </sect2>
-
   <sect2 id="options-codegen">
     <title>Options affecting code generation</title>
 
@@ -989,6 +964,29 @@ $ cat foo.hspp</screen>
 
       <varlistentry>
         <term>
+          <option>-eventlog</option>
+          <indexterm><primary><option>-eventlog</option></primary></indexterm>
+        </term>
+        <listitem>
+          <para>
+            Link the program with the "eventlog" version of the
+            runtime system.  A program linked in this way can generate
+            a runtime trace of events (such as thread start/stop) to a
+            binary file
+            <literal><replaceable>program</replaceable>.eventlog</literal>,
+            which can then be interpreted later by various tools.  See
+            <xref linkend="rts-eventlog" /> for more information.
+          </para>
+          <para>
+            <option>-eventlog</option> can be used
+            with <option>-threaded</option>.  It is implied
+            by <option>-debug</option>.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
           <option>-fno-gen-manifest</option>
           <indexterm><primary><option>-fno-gen-manifest</option></primary>
           </indexterm>
@@ -1052,6 +1050,46 @@ $ cat foo.hspp</screen>
               />).</para>
         </listitem>
       </varlistentry>
+          
+      <varlistentry>
+        <term>
+          <option>-fno-shared-implib</option>
+          <indexterm><primary><option>-fno-shared-implib</option></primary>
+          </indexterm>
+        </term>
+        <listitem>
+          <para>DLLs on Windows are typically linked to by linking to a corresponding
+            <literal>.lib</literal> or <literal>.dll.a</literal> - the so-called import library.
+            GHC will typically generate such a file for every DLL you create by compiling in
+            <literal>-shared</literal> mode. However, sometimes you don't want to pay the
+            disk-space cost of creating this import library, which can be substantial - it
+            might require as much space as the code itself, as Haskell DLLs tend to export
+            lots of symbols.</para>
+            
+          <para>As long as you are happy to only be able to link to the DLL using
+            <literal>GetProcAddress</literal> and friends, you can supply the
+            <option>-fno-shared-implib</option> flag to disable the creation of the import
+            library entirely.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>
+          <option>-dylib-install-name <replaceable>path</replaceable></option>
+          <indexterm><primary><option>-dylib-install-name</option></primary>
+          </indexterm>
+        </term>
+        <listitem>
+          <para>On Darwin/MacOS X, dynamic libraries are stamped at build time with an
+              "install name", which is the ultimate install path of the library file.
+              Any libraries or executables that subsequently link against it will pick
+              up that path as their runtime search location for it. By default, ghc sets
+              the install name to the location where the library is built. This option
+              allows you to override it with the specified file path. (It passes
+              <literal>-install_name</literal> to Apple's linker.) Ignored on other
+              platforms.</para>
+        </listitem>
+      </varlistentry>
     </variablelist>
   </sect2>
 
@@ -1059,7 +1097,6 @@ $ cat foo.hspp</screen>
 
 <!-- Emacs stuff:
      ;;; Local Variables: ***
-     ;;; mode: xml ***
      ;;; sgml-parent-document: ("users_guide.xml" "book" "chapter" "sect1") ***
      ;;; End: ***
  -->