diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-03-23 17:34:17 +0000 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-04-01 11:15:32 +0100 |
commit | 5e5a12d9c672ee30590293e3f2dd48c15d1acf35 (patch) | |
tree | 4d2f403db0ef81050d9e8d51239ab74a57019ce6 /testsuite/tests/driver | |
parent | f8fc6d2e91038a98a321eceefe0a2ffff3dc9e72 (diff) | |
download | haskell-5e5a12d9c672ee30590293e3f2dd48c15d1acf35.tar.gz |
driver: In oneshot mode, look for interface files in hidir
How things should work:
* -i is the search path for source files
* -hidir explicitly sets the search path for interface files and the output location for interface files.
* -odir sets the search path and output location for object files.
Before in one shot mode we would look for the interface file in the
search locations given by `-i`, but then set the path to be in the
`hidir`, so in unusual situations the finder could find an interface
file in the `-i` dir but later fail because it tried to read the
interface file from the `-hidir`.
A bug identified by #20569
Diffstat (limited to 'testsuite/tests/driver')
-rw-r--r-- | testsuite/tests/driver/Makefile | 5 | ||||
-rw-r--r-- | testsuite/tests/driver/T20569/A.hs | 1 | ||||
-rw-r--r-- | testsuite/tests/driver/T20569/B.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/driver/all.T | 1 |
4 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/driver/Makefile b/testsuite/tests/driver/Makefile index 9242c2d512..8d47dba2d5 100644 --- a/testsuite/tests/driver/Makefile +++ b/testsuite/tests/driver/Makefile @@ -739,3 +739,8 @@ T20316: "$(TEST_HC)" $(TEST_HC_OPTS) -fno-code T20316.hs -ddump-to-file -ddump-timings; echo "*** non-module.dump-timings ***" cat non-module.dump-timings | grep alloc | sed 's/alloc.*//' + +.PHONY: T20569 +T20569: + "$(TEST_HC)" $(TEST_HC_OPTS) -c T20569/A.hs -i -iT20569 -hidir=interface + "$(TEST_HC)" $(TEST_HC_OPTS) -c T20569/B.hs -i -iT20569 -hidir=interface diff --git a/testsuite/tests/driver/T20569/A.hs b/testsuite/tests/driver/T20569/A.hs new file mode 100644 index 0000000000..d843c00b78 --- /dev/null +++ b/testsuite/tests/driver/T20569/A.hs @@ -0,0 +1 @@ +module A where diff --git a/testsuite/tests/driver/T20569/B.hs b/testsuite/tests/driver/T20569/B.hs new file mode 100644 index 0000000000..ce9e7e4932 --- /dev/null +++ b/testsuite/tests/driver/T20569/B.hs @@ -0,0 +1,3 @@ +module B where + +import A diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T index 07a6ec8c74..92fa6edceb 100644 --- a/testsuite/tests/driver/all.T +++ b/testsuite/tests/driver/all.T @@ -304,3 +304,4 @@ test('T20200loop', extra_files(['T20200loop']), multimod_compile, test('T20316', normal, makefile_test, []) test('MultiRootsErr', normal, multimod_compile_fail, ['MultiRootsErr', 'MultiRootsErr']) test('patch-level2', normal, compile, ['-Wcpp-undef']) +test('T20569', extra_files(["T20569/"]), makefile_test, []) |