Fix #16500: look for interface files in -hidir flag in OneShot mode
authorPhuong Trinh <lolotp@fb.com>
Sat, 30 Mar 2019 19:00:12 +0000 (19:00 +0000)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Mon, 8 Apr 2019 18:35:43 +0000 (14:35 -0400)
commit2b3f4718502465e2b4dfa4a7868ed7a3ad5e4ff1
treeefa049b8a63f6fee669379b6a09e301ea7da7ec9
parent63b7d5fb9d695dafc243cbf6f9f70b06030c0dea
Fix #16500: look for interface files in -hidir flag in OneShot mode

We are currently ignoring options set in the hiDir field of hsc_dflags
when looking for interface files while compiling in OneShot mode. This
is inconsistent with the behaviour of other directory redirecting fields
(such as objectDir or hieDir). It is also inconsistent with the
behaviour of compilation in CompManager mode (a.k.a `ghc --make`) which
looks for interface files in the directory set in hidir flag. This
changes Finder.hs so that we use the value of hiDir while looking for
interface in OneShot mode.
compiler/main/Finder.hs
docs/users_guide/separate_compilation.rst
testsuite/tests/driver/T16500/A.hs [new file with mode: 0644]
testsuite/tests/driver/T16500/B.hs [new file with mode: 0644]
testsuite/tests/driver/T16500/Makefile [new file with mode: 0644]
testsuite/tests/driver/T16500/T16500.stdout [new file with mode: 0644]
testsuite/tests/driver/T16500/all.T [new file with mode: 0644]