Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
bb074cb7
Commit
bb074cb7
authored
Sep 27, 2008
by
Simon Marlow
Browse files
Add -outputdir flag (
#2295
)
parent
a5e3c828
Changes
3
Hide whitespace changes
Inline
Side-by-side
compiler/main/DynFlags.hs
View file @
bb074cb7
...
...
@@ -680,7 +680,8 @@ getVerbFlag dflags
|
verbosity
dflags
>=
3
=
"-v"
|
otherwise
=
""
setObjectDir
,
setHiDir
,
setStubDir
,
setObjectSuf
,
setHiSuf
,
setHcSuf
,
parseDynLibLoaderMode
,
setObjectDir
,
setHiDir
,
setStubDir
,
setOutputDir
,
setObjectSuf
,
setHiSuf
,
setHcSuf
,
parseDynLibLoaderMode
,
setPgmP
,
setPgmL
,
setPgmF
,
setPgmc
,
setPgmm
,
setPgms
,
setPgma
,
setPgml
,
setPgmdll
,
setPgmwindres
,
addOptL
,
addOptP
,
addOptF
,
addOptc
,
addOptm
,
addOpta
,
addOptl
,
addOptwindres
,
addCmdlineFramework
,
addHaddockOpts
...
...
@@ -693,6 +694,7 @@ setHiDir f d = d{ hiDir = Just f}
setStubDir
f
d
=
d
{
stubDir
=
Just
f
,
includePaths
=
f
:
includePaths
d
}
-- -stubdir D adds an implicit -I D, so that gcc can find the _stub.h file
-- \#included from the .hc file when compiling with -fvia-C.
setOutputDir
f
=
setObjectDir
f
.
setHiDir
f
.
setStubDir
f
setObjectSuf
f
d
=
d
{
objectSuf
=
f
}
setHiSuf
f
d
=
d
{
hiSuf
=
f
}
...
...
@@ -1198,6 +1200,7 @@ dynamic_flags = [
,
Flag
"hidir"
(
HasArg
(
upd
.
setHiDir
))
Supported
,
Flag
"tmpdir"
(
HasArg
(
upd
.
setTmpDir
))
Supported
,
Flag
"stubdir"
(
HasArg
(
upd
.
setStubDir
))
Supported
,
Flag
"outputdir"
(
HasArg
(
upd
.
setOutputDir
))
Supported
,
Flag
"ddump-file-prefix"
(
HasArg
(
upd
.
setDumpPrefixForce
.
Just
))
Supported
...
...
docs/users_guide/flags.xml
View file @
bb074cb7
...
...
@@ -254,7 +254,7 @@
</row>
<row>
<entry><option>
-odir
</option>
<replaceable>
dir
</replaceable></entry>
<entry>
set
output
directory
</entry>
<entry>
set directory
for object files
</entry>
<entry>
dynamic
</entry>
<entry>
-
</entry>
</row>
...
...
@@ -276,6 +276,12 @@
<entry>
dynamic
</entry>
<entry>
-
</entry>
</row>
<row>
<entry><option>
-outputdir
</option>
<replaceable>
dir
</replaceable></entry>
<entry>
set output directory
</entry>
<entry>
dynamic
</entry>
<entry>
-
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
...
...
docs/users_guide/separate_compilation.xml
View file @
bb074cb7
...
...
@@ -374,6 +374,20 @@ $ ghc -c parse/Foo.hs parse/Bar.hs gurgle/Bumble.hs -odir `arch`
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>
-outputdir
</option>
<replaceable>
dir
</replaceable>
<indexterm><primary><option>
-outputdir
</option></primary></indexterm>
</term>
<listitem>
<para>
The
<option>
-outputdir
</option>
option is shorthand for
the combination
of
<option>
-odir
</option>
,
<option>
-hidir
</option>
,
and
<option>
-stubdir
</option>
.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>
-osuf
</option>
<replaceable>
suffix
</replaceable>
...
...
Write
Preview
Supports
Markdown
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