Skip to content

Commit c466796

Browse files
committed
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 ldc-developers#505.
1 parent d46d4ce commit c466796

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

driver/main.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ static void parseCommandLine(int argc, char **argv, Strings &sourceFiles, bool &
202202
#endif
203203
);
204204

205+
helpOnly = mCPU == "help" ||
206+
(std::find(mAttrs.begin(), mAttrs.end(), "help") != mAttrs.end());
207+
205208
// Print config file path if -v was passed
206209
if (global.params.verbose) {
207210
const std::string& path = cfg_file.path();

0 commit comments

Comments
 (0)