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
Shayne Fletcher
Glasgow Haskell Compiler
Commits
c7498bbd
Commit
c7498bbd
authored
Apr 10, 2014
by
Edward Z. Yang
Browse files
Fix
#8641
, creating directories when we have stubs.
Signed-off-by:
Edward Z. Yang
<
ezyang@cs.stanford.edu
>
parent
c269b7e8
Changes
4
Hide whitespace changes
Inline
Side-by-side
compiler/main/DriverPipeline.hs
View file @
c7498bbd
...
...
@@ -1259,6 +1259,7 @@ runPhase (RealPhase SplitAs) _input_fn dflags
osuf
=
objectSuf
dflags
split_odir
=
base_o
++
"_"
++
osuf
++
"_split"
-- this also creates the hierarchy
liftIO
$
createDirectoryIfMissing
True
split_odir
-- remove M_split/ *.o, because we're going to archive M_split/ *.o
...
...
@@ -1469,6 +1470,7 @@ runPhase (RealPhase MergeStub) input_fn dflags
=
do
PipeState
{
maybe_stub_o
}
<-
getPipeState
output_fn
<-
phaseOutputFilename
StopLn
liftIO
$
createDirectoryIfMissing
True
(
takeDirectory
output_fn
)
case
maybe_stub_o
of
Nothing
->
panic
"runPhase(MergeStub): no stub"
...
...
testsuite/tests/driver/B042stub/C.hs
0 → 100644
View file @
c7498bbd
{-# LANGUAGE ForeignFunctionInterface #-}
module
B042stub.C
where
foreign
export
ccall
foo
::
IO
()
foo
::
IO
()
foo
=
return
()
testsuite/tests/driver/Makefile
View file @
c7498bbd
...
...
@@ -222,6 +222,14 @@ test042:
"
$(TEST_HC)
"
$(TEST_HC_OPTS_NO_RECOMP)
-v0
--make
B042/C.hs
-odir
obj042
test
-f
obj042/B042/C
$(OBJSUFFIX)
# test -odir with stubs
test042stub
:
$(RM)
-rf
obj042stub
mkdir
obj042stub
$(RM)
B042stub/C.hi
"
$(TEST_HC)
"
$(TEST_HC_OPTS_NO_RECOMP)
-v0
--make
B042stub/C.hs
-odir
obj042stub
test
-f
obj042stub/B042stub/C
$(OBJSUFFIX)
# test -hidir
test043
:
$(RM)
-f
B043/C
$(OBJSUFFIX)
...
...
testsuite/tests/driver/all.T
View file @
c7498bbd
...
...
@@ -142,6 +142,11 @@ test('driver042',
run_command
,
['
$MAKE -s --no-print-directory test042
'])
test
('
driver042stub
',
extra_clean
(['
B042stub/C.hi
',
'
obj042stub/B042stub/C.o
',
'
obj042stub/B042stub/
',
'
obj042stub/
']),
run_command
,
['
$MAKE -s --no-print-directory test042stub
'])
test
('
driver043
',
extra_clean
(['
B043/C.hi
',
'
B043/C.o
',
'
hi043/B043/C.hi
',
'
hi043/B043
',
'
hi043
']),
...
...
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