Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/2d4d9a24967e25d7efe780b583cb5c250c17e02d

>---------------------------------------------------------------

commit 2d4d9a24967e25d7efe780b583cb5c250c17e02d
Author: Simon Marlow <[email protected]>
Date:   Wed Nov 16 10:23:18 2011 +0000

    Set -no-hs-main if the test is not Haskell code
    
    Required by the changes to GHC to generate main() when linking.

>---------------------------------------------------------------

 driver/testlib.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/driver/testlib.py b/driver/testlib.py
index 1652b86..1d5a0b7 100644
--- a/driver/testlib.py
+++ b/driver/testlib.py
@@ -1000,6 +1000,12 @@ def simple_build( name, way, extra_hc_opts, should_fail, 
top_mod, link, addsuf,
     if len(opts.compiler_stats_num_fields) > 0:
         extra_hc_opts += ' +RTS -V0 -t' + stats_file + ' --machine-readable 
-RTS'
 
+    # Required by GHC 7.3+, harmless for earlier versions:
+    if (getTestOpts().c_src or
+        getTestOpts().objc_src or
+        getTestOpts().objcpp_src):
+        extra_hc_opts += ' -no-hs-main '
+
     if getTestOpts().compile_cmd_prefix == '':
         cmd_prefix = ''
     else:



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to