diff options
author | Simon Marlow <marlowsd@gmail.com> | 2012-03-13 11:30:13 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-03-13 11:32:56 +0000 |
commit | 93299cce9a4f7bc65b8164f779a37ef7f9f7c4a0 (patch) | |
tree | 6312dac65f5be696a00f4dca653dd127d3149046 /ghc | |
parent | 5513fe060a82a9a3ca1d4cff22947faafc538cfe (diff) | |
download | haskell-93299cce9a4f7bc65b8164f779a37ef7f9f7c4a0.tar.gz |
Tweak to flag parsing (#5921)
-o2/Main.exe should be an invalid flag, not a linker input
Diffstat (limited to 'ghc')
-rw-r--r-- | ghc/Main.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs index 204c54fa70..a8202f2853 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -255,6 +255,10 @@ partition_args (arg:args) srcs objs - module names (not forgetting hierarchical module names), + - things beginning with '-' are flags that were not recognised by + the flag parser, and we want them to generate errors later in + checkOptions, so we class them as source files (#5921) + - and finally we consider everything not containing a '.' to be a comp manager input, as shorthand for a .hs or .lhs filename. @@ -264,6 +268,7 @@ partition_args (arg:args) srcs objs looks_like_an_input :: String -> Bool looks_like_an_input m = isSourceFilename m || looksLikeModuleName m + || "-" `isPrefixOf` m || '.' `notElem` m -- ----------------------------------------------------------------------------- |