mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Cleaned up version output.
I removed the copyright notice. I don't think we are obliged to display it for DMD; on the other hand, if we do, we might also have to display the libconfig one (LGPL). Thus, this seemed like the better choice. The indentation is to align with the registered target output, which we cannot control.
This commit is contained in:
@@ -71,7 +71,7 @@ Global::Global()
|
||||
copyright = "Copyright (c) 1999-2012 by Digital Mars and Tomas Lindquist Olsen";
|
||||
written = "written by Walter Bright and Tomas Lindquist Olsen";
|
||||
version = "v1.075";
|
||||
ldc_version = "LDC trunk";
|
||||
ldc_version = "trunk";
|
||||
llvm_version = "LLVM "LDC_LLVM_VERSION_STRING;
|
||||
global.structalign = STRUCTALIGN_DEFAULT;
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ Global::Global()
|
||||
;
|
||||
version = "v2.060";
|
||||
#if IN_LLVM
|
||||
ldc_version = "LDC trunk";
|
||||
ldc_version = "trunk";
|
||||
llvm_version = "LLVM "LDC_LLVM_VERSION_STRING;
|
||||
#endif
|
||||
global.structalign = STRUCTALIGN_DEFAULT;
|
||||
|
||||
@@ -90,15 +90,13 @@ static cl::list<std::string, StringsAdapter> debuglibs("debuglib",
|
||||
cl::CommaSeparated);
|
||||
|
||||
void printVersion() {
|
||||
printf("LLVM D Compiler %s\nbased on DMD %s and %s\n%s\n%s\n",
|
||||
global.ldc_version, global.version, global.llvm_version, global.copyright, global.written);
|
||||
printf("D Language Documentation: http://d-programming-language.org/index.html\n"
|
||||
"LDC Homepage: https://github.com/ldc-developers/ldc\n");
|
||||
printf("\n");
|
||||
printf("LDC - the LLVM D compiler (%s):\n", global.ldc_version);
|
||||
printf(" based on DMD %s and %s\n", global.version, global.llvm_version);
|
||||
printf(" Default target: %s\n", llvm::sys::getDefaultTargetTriple().c_str());
|
||||
std::string CPU = llvm::sys::getHostCPUName();
|
||||
if (CPU == "generic") CPU = "(unknown)";
|
||||
printf(" Host CPU: %s\n", CPU.c_str());
|
||||
printf(" http://dlang.org - http://wiki.dlang.org/LDC\n");
|
||||
printf("\n");
|
||||
|
||||
// Without explicitly flushing here, only the target list is visible when
|
||||
@@ -242,11 +240,12 @@ int main(int argc, char** argv)
|
||||
|
||||
// Handle fixed-up arguments!
|
||||
cl::SetVersionPrinter(&printVersion);
|
||||
#if LDC_LLVM_VER >= 302
|
||||
cl::ParseCommandLineOptions(final_args.size(), const_cast<char**>(&final_args[0]), "LLVM-based D Compiler\n");
|
||||
#else
|
||||
cl::ParseCommandLineOptions(final_args.size(), const_cast<char**>(&final_args[0]), "LLVM-based D Compiler\n", true);
|
||||
cl::ParseCommandLineOptions(final_args.size(), const_cast<char**>(&final_args[0]),
|
||||
"LDC - the LLVM D compiler\n"
|
||||
#if LDC_LLVM_VER < 302
|
||||
, true
|
||||
#endif
|
||||
);
|
||||
|
||||
// Print config file path if -v was passed
|
||||
if (global.params.verbose) {
|
||||
|
||||
Reference in New Issue
Block a user