diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/count-deps/CountDepsAst.stdout | 4 | ||||
-rw-r--r-- | testsuite/tests/count-deps/CountDepsParser.stdout | 4 | ||||
-rw-r--r-- | testsuite/tests/driver/T20348/Makefile | 35 | ||||
-rw-r--r-- | testsuite/tests/driver/T20348/all.T | 5 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp-boot-dyn-too/A.hs | 1 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp-boot-dyn-too/A.hs-boot | 1 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp-boot-dyn-too/B1.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp-boot-dyn-too/B2.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp-boot-dyn-too/Makefile | 18 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp-boot-dyn-too/all.T | 4 | ||||
-rw-r--r-- | testsuite/tests/driver/recomp-boot-dyn-too/recomp-boot-dyn-too.stdout | 4 | ||||
-rw-r--r-- | testsuite/tests/regalloc/regalloc_unit_tests.hs | 4 |
12 files changed, 79 insertions, 7 deletions
diff --git a/testsuite/tests/count-deps/CountDepsAst.stdout b/testsuite/tests/count-deps/CountDepsAst.stdout index da2b5b3e5c..9117f0892c 100644 --- a/testsuite/tests/count-deps/CountDepsAst.stdout +++ b/testsuite/tests/count-deps/CountDepsAst.stdout @@ -1,4 +1,4 @@ -Found 278 Language.Haskell.Syntax module dependencies +Found 276 Language.Haskell.Syntax module dependencies GHC.Builtin.Names GHC.Builtin.PrimOps GHC.Builtin.Types @@ -85,7 +85,6 @@ GHC.Data.TrieMap GHC.Driver.Backend GHC.Driver.CmdLine GHC.Driver.Config.Diagnostic -GHC.Driver.Config.Finder GHC.Driver.Config.Logger GHC.Driver.Env GHC.Driver.Env.KnotVars @@ -223,7 +222,6 @@ GHC.Types.Var.Set GHC.Unit GHC.Unit.Env GHC.Unit.External -GHC.Unit.Finder GHC.Unit.Finder.Types GHC.Unit.Home GHC.Unit.Home.ModInfo diff --git a/testsuite/tests/count-deps/CountDepsParser.stdout b/testsuite/tests/count-deps/CountDepsParser.stdout index f67d2eb223..2738d7d33f 100644 --- a/testsuite/tests/count-deps/CountDepsParser.stdout +++ b/testsuite/tests/count-deps/CountDepsParser.stdout @@ -1,4 +1,4 @@ -Found 284 GHC.Parser module dependencies +Found 282 GHC.Parser module dependencies GHC.Builtin.Names GHC.Builtin.PrimOps GHC.Builtin.Types @@ -86,7 +86,6 @@ GHC.Driver.Backend GHC.Driver.Backpack.Syntax GHC.Driver.CmdLine GHC.Driver.Config.Diagnostic -GHC.Driver.Config.Finder GHC.Driver.Config.Logger GHC.Driver.Env GHC.Driver.Env.KnotVars @@ -229,7 +228,6 @@ GHC.Types.Var.Set GHC.Unit GHC.Unit.Env GHC.Unit.External -GHC.Unit.Finder GHC.Unit.Finder.Types GHC.Unit.Home GHC.Unit.Home.ModInfo diff --git a/testsuite/tests/driver/T20348/Makefile b/testsuite/tests/driver/T20348/Makefile index e6903e4cc4..ba1edd021d 100644 --- a/testsuite/tests/driver/T20348/Makefile +++ b/testsuite/tests/driver/T20348/Makefile @@ -24,3 +24,38 @@ T20348: clean # Second run: should not recompile. echo 'second run' '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fwrite-interface A.hs + +T20348A: clean + '$(TEST_HC)' $(TEST_HC_OPTS) -c -o A2.o -ohi A2.hi -dynohi A2.dyn_hi A.hs -dynamic-too + $(call checkExists,A2.hi) + $(call checkExists,A2.o) + $(call checkExists,A2.dyn_hi) + $(call checkExists,A2.dyn_o) + +T20348B: clean + '$(TEST_HC)' $(TEST_HC_OPTS) -c -o A2.o -ohi A2.hi A.hs -dynamic-too + $(call checkExists,A2.hi) + $(call checkExists,A2.o) + $(call checkExists,A.dyn_hi) + $(call checkExists,A2.dyn_o) + +T20348C: clean + '$(TEST_HC)' $(TEST_HC_OPTS) -c -o A2.o -dyno A2.dyn_o A.hs -dynamic-too + $(call checkExists,A.hi) + $(call checkExists,A2.o) + $(call checkExists,A.dyn_hi) + $(call checkExists,A2.dyn_o) + +T20348D: clean + '$(TEST_HC)' $(TEST_HC_OPTS) -c -dyno A2.dyn_o A.hs -dynamic-too + $(call checkExists,A.hi) + $(call checkExists,A.o) + $(call checkExists,A.dyn_hi) + $(call checkExists,A2.dyn_o) + +T20348E: clean + '$(TEST_HC)' $(TEST_HC_OPTS) -S -o A2.s A.hs -dynamic-too + $(call checkExists,A2.s) + $(call checkExists,A2.dyn_s) + + diff --git a/testsuite/tests/driver/T20348/all.T b/testsuite/tests/driver/T20348/all.T index 935c8efa8c..e7717ca770 100644 --- a/testsuite/tests/driver/T20348/all.T +++ b/testsuite/tests/driver/T20348/all.T @@ -1,3 +1,8 @@ # N.B. this package requires a dynamically-linked ghc-bin, since it assumes # that TH evaluation will build dynamic objects. test('T20348', [extra_files(['A.hs']), unless(have_dynamic(), skip)], makefile_test, []) +test('T20348A', [extra_files(['A.hs']), unless(have_dynamic(), skip)], makefile_test, []) +test('T20348B', [extra_files(['A.hs']), unless(have_dynamic(), skip)], makefile_test, []) +test('T20348C', [extra_files(['A.hs']), unless(have_dynamic(), skip)], makefile_test, []) +test('T20348D', [extra_files(['A.hs']), unless(have_dynamic(), skip)], makefile_test, []) +test('T20348E', [extra_files(['A.hs']), unless(have_dynamic(), skip)], makefile_test, []) diff --git a/testsuite/tests/driver/recomp-boot-dyn-too/A.hs b/testsuite/tests/driver/recomp-boot-dyn-too/A.hs new file mode 100644 index 0000000000..d843c00b78 --- /dev/null +++ b/testsuite/tests/driver/recomp-boot-dyn-too/A.hs @@ -0,0 +1 @@ +module A where diff --git a/testsuite/tests/driver/recomp-boot-dyn-too/A.hs-boot b/testsuite/tests/driver/recomp-boot-dyn-too/A.hs-boot new file mode 100644 index 0000000000..d843c00b78 --- /dev/null +++ b/testsuite/tests/driver/recomp-boot-dyn-too/A.hs-boot @@ -0,0 +1 @@ +module A where diff --git a/testsuite/tests/driver/recomp-boot-dyn-too/B1.hs b/testsuite/tests/driver/recomp-boot-dyn-too/B1.hs new file mode 100644 index 0000000000..ce9e7e4932 --- /dev/null +++ b/testsuite/tests/driver/recomp-boot-dyn-too/B1.hs @@ -0,0 +1,3 @@ +module B where + +import A diff --git a/testsuite/tests/driver/recomp-boot-dyn-too/B2.hs b/testsuite/tests/driver/recomp-boot-dyn-too/B2.hs new file mode 100644 index 0000000000..b3fc879af1 --- /dev/null +++ b/testsuite/tests/driver/recomp-boot-dyn-too/B2.hs @@ -0,0 +1,3 @@ +module B where + +import {-# SOURCE #-} A diff --git a/testsuite/tests/driver/recomp-boot-dyn-too/Makefile b/testsuite/tests/driver/recomp-boot-dyn-too/Makefile new file mode 100644 index 0000000000..6c3761b3d4 --- /dev/null +++ b/testsuite/tests/driver/recomp-boot-dyn-too/Makefile @@ -0,0 +1,18 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +# Recompilation tests + +clean: + rm -f *.dyn_hi *.dyn_hi-boot *.dyn_o *.dyn_o-boot *.hi *.hi-boot *.o *.o-boot + rm -f B.hs + +# Recompile + +recomp-boot-dyn-too: clean + cp B1.hs B.hs + '$(TEST_HC)' $(TEST_HC_OPTS) --make -dynamic-too B.hs + cp B2.hs B.hs + '$(TEST_HC)' $(TEST_HC_OPTS) --make -dynamic-too B.hs + '$(TEST_HC)' $(TEST_HC_OPTS) --make -dynamic-too B.hs diff --git a/testsuite/tests/driver/recomp-boot-dyn-too/all.T b/testsuite/tests/driver/recomp-boot-dyn-too/all.T new file mode 100644 index 0000000000..8d4d6657c0 --- /dev/null +++ b/testsuite/tests/driver/recomp-boot-dyn-too/all.T @@ -0,0 +1,4 @@ +test('recomp-boot-dyn-too', [ unless(have_dynamic(), skip) + , extra_files(['A.hs', 'B1.hs', 'B2.hs', 'A.hs-boot']) + , when(fast(), skip)], + makefile_test, []) diff --git a/testsuite/tests/driver/recomp-boot-dyn-too/recomp-boot-dyn-too.stdout b/testsuite/tests/driver/recomp-boot-dyn-too/recomp-boot-dyn-too.stdout new file mode 100644 index 0000000000..e8ce474459 --- /dev/null +++ b/testsuite/tests/driver/recomp-boot-dyn-too/recomp-boot-dyn-too.stdout @@ -0,0 +1,4 @@ +[1 of 2] Compiling A ( A.hs, A.o, A.dyn_o ) +[2 of 2] Compiling B ( B.hs, B.o, B.dyn_o ) +[1 of 3] Compiling A[boot] ( A.hs-boot, A.o-boot, A.dyn_o-boot ) +[2 of 3] Compiling B ( B.hs, B.o, B.dyn_o ) [Source file changed] diff --git a/testsuite/tests/regalloc/regalloc_unit_tests.hs b/testsuite/tests/regalloc/regalloc_unit_tests.hs index 994ecde659..7726c79b1f 100644 --- a/testsuite/tests/regalloc/regalloc_unit_tests.hs +++ b/testsuite/tests/regalloc/regalloc_unit_tests.hs @@ -50,6 +50,8 @@ import GHC.Utils.Logger import GHC.Utils.Outputable import GHC.Types.Basic import GHC.Unit.Home +import GHC.Unit.Finder +import GHC.Driver.Config.Finder import GHC.Data.Stream as Stream (collect, yield) @@ -158,7 +160,7 @@ compileCmmForRegAllocStats logger dflags cmmFile ncgImplF us = do thisMod = mkModule (stringToUnit . show . uniqFromSupply $ usc) (mkModuleName . show . uniqFromSupply $ usd) - thisModLoc = ModLocation Nothing (cmmFile ++ ".hi") (cmmFile ++ ".o") (cmmFile ++ ".hie") + thisModLoc = mkHiOnlyModLocation (initFinderOpts dflags) "hi" "dyn_hi" "" cmmFile -- | The register allocator should be able to see that each variable only |