[commit: ghc] master: Fix compilation of cmm files with -outputdir (Trac #9050) (2a463eb)
git at git.haskell.org
git at git.haskell.org
Thu Jun 5 20:25:30 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/2a463ebeba4dff6793ae16707712f1e9245225e8/ghc
>---------------------------------------------------------------
commit 2a463ebeba4dff6793ae16707712f1e9245225e8
Author: Yuras Shumovich <shumovichy at gmail.com>
Date: Fri May 2 00:11:58 2014 +0300
Fix compilation of cmm files with -outputdir (Trac #9050)
>---------------------------------------------------------------
2a463ebeba4dff6793ae16707712f1e9245225e8
compiler/main/CodeOutput.lhs | 7 ++-----
testsuite/tests/driver/T9050.cmm | 1 +
testsuite/tests/driver/all.T | 4 ++++
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/compiler/main/CodeOutput.lhs b/compiler/main/CodeOutput.lhs
index f6756b1..7ae28b3 100644
--- a/compiler/main/CodeOutput.lhs
+++ b/compiler/main/CodeOutput.lhs
@@ -192,11 +192,8 @@ outputForeignStubs dflags mod location stubs
stub_c <- newTempName dflags "c"
case stubs of
- NoStubs -> do
- -- When compiling External Core files, may need to use stub
- -- files from a previous compilation
- stub_h_exists <- doesFileExist stub_h
- return (stub_h_exists, Nothing)
+ NoStubs ->
+ return (False, Nothing)
ForeignStubs h_code c_code -> do
let
diff --git a/testsuite/tests/driver/T9050.cmm b/testsuite/tests/driver/T9050.cmm
new file mode 100644
index 0000000..8b1a393
--- /dev/null
+++ b/testsuite/tests/driver/T9050.cmm
@@ -0,0 +1 @@
+// empty
diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T
index ed0ce0f..69f4cd3 100644
--- a/testsuite/tests/driver/all.T
+++ b/testsuite/tests/driver/all.T
@@ -395,3 +395,7 @@ test('T2507',
test('T703', normal, run_command, ['$MAKE -s --no-print-directory T703'])
test('T8101', normal, compile, ['-Wall -fno-code'])
+def build_T9050(name, way):
+ return simple_build(name + '.cmm', way, '-outputdir=. ', 0, '', 0, 0, 0)
+test('T9050', normal, build_T9050, [])
+
More information about the ghc-commits
mailing list