From c466796b93b4b99c0bf0a0d00822e5890925fe37 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Sun, 13 Oct 2013 20:14:26 +0200 Subject: [PATCH] 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. --- driver/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/driver/main.cpp b/driver/main.cpp index f349cc4a..37b66122 100644 --- a/driver/main.cpp +++ b/driver/main.cpp @@ -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();