mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 19:03:13 +01:00
Merge pull request #508 from klickverbot/mcpu-mattr-help
Display -mcpu/-mattr help even with no source files given.
This commit is contained in:
@@ -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();
|
||||
@@ -1068,8 +1071,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (name && name[0] == '-' && name[1] == 0)
|
||||
{ // Write to stdout; assume it succeeds
|
||||
int n = fwrite(buf.data, 1, buf.offset, stdout);
|
||||
assert(n == buf.offset); // keep gcc happy about return values
|
||||
(void)fwrite(buf.data, 1, buf.offset, stdout);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user