summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-07-14 16:56:31 +0000
committerIan Lynagh <igloo@earth.li>2009-07-14 16:56:31 +0000
commit269949584b7c124e95543c5c006822db4cec4d8b (patch)
tree6ce377a155da47f0ead03b8a6cbf85653bb87473 /docs
parent380e4e40e2e6b7ccb18b7103acb075d80168e595 (diff)
downloadhaskell-269949584b7c124e95543c5c006822db4cec4d8b.tar.gz
Add the -fno-shared-implib flag
Patch from Max Bolingbroke <batterseapower@hotmail.com> Rerecorded to avoid conflicts.
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/flags.xml6
-rw-r--r--docs/users_guide/phases.xml22
2 files changed, 28 insertions, 0 deletions
diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml
index bfffb096c4..0b22a396b7 100644
--- a/docs/users_guide/flags.xml
+++ b/docs/users_guide/flags.xml
@@ -1833,6 +1833,12 @@
<entry>dynamic</entry>
<entry>-</entry>
</row>
+ <row>
+ <entry><option>-no-shared-implib</option></entry>
+ <entry>Don't generate an import library for a DLL (Windows only)</entry>
+ <entry>dynamic</entry>
+ <entry>-</entry>
+ </row>
</tbody>
</tgroup>
</informaltable>
diff --git a/docs/users_guide/phases.xml b/docs/users_guide/phases.xml
index 2026a34f59..ec1436434f 100644
--- a/docs/users_guide/phases.xml
+++ b/docs/users_guide/phases.xml
@@ -1052,6 +1052,28 @@ $ 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>
</variablelist>
</sect2>