Add `-fplugin-trustworthy` to avoid marking modules as unsafe
authorZejun Wu <watashi@fb.com>
Thu, 31 Jan 2019 06:13:42 +0000 (22:13 -0800)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Mon, 4 Feb 2019 16:04:22 +0000 (11:04 -0500)
commit406e43af2f12756c80d583b86326f760f2f584cc
treec0cafcc79b93aa398287704dd1fd6780f6c6f5c1
parentef25b59a97f419a2ad6457f696e32aef9ffb3a0f
Add `-fplugin-trustworthy` to avoid marking modules as unsafe

By default, when a module is compiled with plugins, it will be marked as
unsafe. With this flag passed, all plugins are treated as trustworthy
and the safety inference will no longer be affected.

This fixes Trac #16260.
compiler/main/DynFlags.hs
compiler/main/Plugins.hs
compiler/typecheck/TcRnDriver.hs
docs/users_guide/extending_ghc.rst
testsuite/tests/plugins/Makefile
testsuite/tests/plugins/T16260.hs [new file with mode: 0644]
testsuite/tests/plugins/T16260.stdout [new file with mode: 0644]
testsuite/tests/plugins/all.T
testsuite/tests/plugins/simple-plugin/Simple/TrustworthyPlugin.hs [new file with mode: 0644]
testsuite/tests/plugins/simple-plugin/simple-plugin.cabal