Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,321
Issues
4,321
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
359
Merge Requests
359
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
dde80d73
Commit
dde80d73
authored
Oct 28, 2005
by
simonmar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[project @ 2005-10-28 15:51:15 by simonmar]
document -stubdir
parent
f2e730f3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
0 deletions
+45
-0
ghc/docs/users_guide/ffi-chap.xml
ghc/docs/users_guide/ffi-chap.xml
+5
-0
ghc/docs/users_guide/flags.xml
ghc/docs/users_guide/flags.xml
+6
-0
ghc/docs/users_guide/separate_compilation.xml
ghc/docs/users_guide/separate_compilation.xml
+34
-0
No files found.
ghc/docs/users_guide/ffi-chap.xml
View file @
dde80d73
...
...
@@ -107,6 +107,11 @@ extern HsInt foo(HsInt a0);</programlisting>
invoke
<literal>
foo()
</literal>
from C, just
<literal>
#include
"Foo_stub.h"
</literal>
and call
<literal>
foo()
</literal>
.
</para>
<para>
The
<filename>
foo_stub.c
</filename>
and
<filename>
foo_stub.h
</filename>
files can be redirected using the
<option>
-stubdir
</option>
option; see
<xref
linkend=
"options-output"
/>
.
</para>
<sect3
id=
"using-own-main"
>
<title>
Using your own
<literal>
main()
</literal></title>
...
...
ghc/docs/users_guide/flags.xml
View file @
dde80d73
...
...
@@ -242,6 +242,12 @@
<entry>
dynamic
</entry>
<entry>
-
</entry>
</row>
<row>
<entry><option>
-stubdir
</option>
<replaceable>
dir
</replaceable></entry>
<entry>
redirect FFi stub files
</entry>
<entry>
dynamic
</entry>
<entry>
-
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
...
...
ghc/docs/users_guide/separate_compilation.xml
View file @
dde80d73
...
...
@@ -253,6 +253,23 @@
<filename>
Main.hs
</filename>
, and put the resulting
executable in
<filename>
foo.exe
</filename>
(not
<filename>
foo
</filename>
).
</para>
<para>
If you use
<command>
ghc --make
</command>
and you don't
use the
<option>
-o
</option>
, the name GHC will choose
for the executable will be based on the name of the file
containing the module
<literal>
Main
</literal>
.
Note that with GHC the
<literal>
Main
</literal>
module doesn't
have to be put in file
<filename>
Main.hs
</filename>
.
Thus both
<programlisting>
ghc --make Prog
</programlisting>
and
<programlisting>
ghc --make Prog.hs
</programlisting>
will produce
<filename>
Prog
</filename>
(or
<filename>
Prog.exe
</filename>
if you are on Windows).
</para>
</listitem>
</varlistentry>
...
...
@@ -324,6 +341,23 @@ $ ghc -c parse/Foo.hs parse/Bar.hs gurgle/Bumble.hs -odir `arch`
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>
-stubdir
</option>
<replaceable>
dir
</replaceable>
<indexterm><primary><option>
-stubdir
</option></primary></indexterm>
</term>
<listitem>
<para>
Redirects all generated FFI stub files into
<replaceable>
dir
</replaceable>
. Stub files are generated when the
Haskell source contains a
<literal>
foreign export
</literal>
or
<literal>
foreign import "
&
wrapper"
</literal>
declaration (see
<xref
linkend=
"foreign-export-ghc"
/>
). The
<option>
-stubdir
</option>
option behaves in exactly the same way as
<option>
-odir
</option>
and
<option>
-hidir
</option>
with respect to hierarchical
modules.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>
-osuf
</option>
<replaceable>
suffix
</replaceable>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment