-
-
Notifications
You must be signed in to change notification settings - Fork 609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add command-line option to print compiler version #3558
Conversation
| void print_version() | ||
| { | ||
| printf("DMD%llu D Compiler %s\n", | ||
| (unsigned long long) sizeof(size_t) * 8, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, 32/64. LOL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's still bad - there is global.params.is64bit if you really must check that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was already like this in usage(), where I moved it from.
But global.params.is64bit cannot be used, because it determines the word size of the generated code (via -m32/-m64), while this string is supposed to print the word size of the compiler itself.
|
Type |
|
Well, the user wanted a way to output only the version... |
Teach them to use grep. |
|
How about Windows users? |
rdmd -m32 --force --eval=writeln(__VERSION__); |
Requested by a user here:
http://forum.dlang.org/thread/mailman.836.1400331667.2907.digitalmars-d-learn@puremagic.com