Display -mcpu/-mattr help even with no source files given.

Unfortunately, we can't easily add a test for this in our
current test runner setup (i.e. dmd-testsuite).

GitHub: Fixes #505.
This commit is contained in:
David Nadlinger
2013-10-13 20:14:26 +02:00
parent d46d4ce4b1
commit c466796b93

View File

@@ -202,6 +202,9 @@ static void parseCommandLine(int argc, char **argv, Strings &sourceFiles, bool &
#endif
);
helpOnly = mCPU == "help" ||
(std::find(mAttrs.begin(), mAttrs.end(), "help") != mAttrs.end());
// Print config file path if -v was passed
if (global.params.verbose) {
const std::string& path = cfg_file.path();