From 8d06145ac0ba6a712d8ef0eef2c0a3262550e36c Mon Sep 17 00:00:00 2001 From: kai Date: Sun, 29 Jul 2012 20:46:14 +0200 Subject: [PATCH] Fixes ticket 457 from dsource.org. -mattr=help does not printout help without source file --- driver/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/driver/main.cpp b/driver/main.cpp index 62132890..aebedff1 100644 --- a/driver/main.cpp +++ b/driver/main.cpp @@ -237,6 +237,8 @@ int main(int argc, char** argv) printf("config %s\n", path.c_str()); } + bool skipModules = mCPU == "help" ||(!mAttrs.empty() && mAttrs.front() == "help"); + // Negated options global.params.link = !compileOnly; global.params.obj = !dontWriteObj; @@ -315,7 +317,7 @@ int main(int argc, char** argv) { fatal(); } - if (files.dim == 0) + if (files.dim == 0 && !skipModules) { cl::PrintHelpMessage(); return EXIT_FAILURE;