Skip to content

Commit

Permalink
Remove redundant flag (-O) registration (fixes #13392)
Browse files Browse the repository at this point in the history
Reviewers: austin, bgamari, dfeuer

Reviewed By: bgamari, dfeuer

Subscribers: rwbarton, thomie

GHC Trac Issues: #13392

Differential Revision: https://phabricator.haskell.org/D3461
  • Loading branch information
SantiMunin authored and bgamari committed Apr 18, 2017
1 parent 5a21003 commit b894f02
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion compiler/main/DynFlags.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3141,7 +3141,6 @@ dynamic_flags_deps = [
, make_ord_flag defGhcFlag "ffrontend-opt" (hasArg addFrontendPluginOption)

------ Optimisation flags ------------------------------------------
, make_ord_flag defGhcFlag "O" (noArgM (setOptLevel 1))
, make_dep_flag defGhcFlag "Onot" (noArgM $ setOptLevel 0 )
"Use -O0 instead"
, make_ord_flag defGhcFlag "Odph" (noArgM setDPHOpt)
Expand Down
6 changes: 6 additions & 0 deletions testsuite/tests/driver/T13392/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk

T13392:
'$(TEST_HC)' $(TEST_HC_OPTS) --show-options | sort | uniq -d
Empty file.
3 changes: 3 additions & 0 deletions testsuite/tests/driver/T13392/all.T
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Test for #13392, it makes sure 'ghc --show-options' does not print each flag more than once.

test('T13392', normal, run_command, ['$MAKE -s --no-print-directory T13392'])

0 comments on commit b894f02

Please sign in to comment.