Mercurial > projects > ldc
comparison dmd/mars.c @ 663:6aaa3d3c1183
First part of rename to LDC.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Mon, 06 Oct 2008 22:46:55 +0200 |
parents | 50383e476c7e |
children | bfe5229f9d8e |
comparison
equal
deleted
inserted
replaced
662:88e23f8c2354 | 663:6aaa3d3c1183 |
---|---|
49 sym_ext = "d"; | 49 sym_ext = "d"; |
50 hdr_ext = "di"; | 50 hdr_ext = "di"; |
51 doc_ext = "html"; | 51 doc_ext = "html"; |
52 ddoc_ext = "ddoc"; | 52 ddoc_ext = "ddoc"; |
53 | 53 |
54 // LLVMDC | 54 // LDC |
55 obj_ext = "bc"; | 55 obj_ext = "bc"; |
56 ll_ext = "ll"; | 56 ll_ext = "ll"; |
57 bc_ext = "bc"; | 57 bc_ext = "bc"; |
58 #if _WIN32 | 58 #if _WIN32 |
59 nativeobj_ext = "obj"; | 59 nativeobj_ext = "obj"; |
64 #endif | 64 #endif |
65 | 65 |
66 copyright = "Copyright (c) 1999-2008 by Digital Mars and Tomas Lindquist Olsen"; | 66 copyright = "Copyright (c) 1999-2008 by Digital Mars and Tomas Lindquist Olsen"; |
67 written = "written by Walter Bright and Tomas Lindquist Olsen"; | 67 written = "written by Walter Bright and Tomas Lindquist Olsen"; |
68 version = "v1.035"; | 68 version = "v1.035"; |
69 llvmdc_version = "0.1"; | 69 ldc_version = "0.1"; |
70 global.structalign = 8; | 70 global.structalign = 8; |
71 | 71 |
72 memset(¶ms, 0, sizeof(Param)); | 72 memset(¶ms, 0, sizeof(Param)); |
73 } | 73 } |
74 | 74 |
152 extern void backend_term(); | 152 extern void backend_term(); |
153 | 153 |
154 void usage() | 154 void usage() |
155 { | 155 { |
156 printf("LLVM D Compiler %s (based on DMD %s and LLVM 2.4svn)\n%s\n%s\n", | 156 printf("LLVM D Compiler %s (based on DMD %s and LLVM 2.4svn)\n%s\n%s\n", |
157 global.llvmdc_version, global.version, global.copyright, global.written); | 157 global.ldc_version, global.version, global.copyright, global.written); |
158 printf("\ | 158 printf("\ |
159 D Language Documentation: http://www.digitalmars.com/d/1.0/index.html\n\ | 159 D Language Documentation: http://www.digitalmars.com/d/1.0/index.html\n\ |
160 LLVMDC Homepage: http://www.dsource.org/projects/llvmdc\n\ | 160 LDC Homepage: http://www.dsource.org/projects/llvmdc\n\ |
161 Usage:\n\ | 161 Usage:\n\ |
162 llvmdc files.d ... { -switch }\n\ | 162 ldc files.d ... { -switch }\n\ |
163 \n\ | 163 \n\ |
164 files.d D source files\n%s\ | 164 files.d D source files\n%s\ |
165 -of<filename> name output file to <filename>\n\ | 165 -of<filename> name output file to <filename>\n\ |
166 -o- do not write object file\n\ | 166 -o- do not write object file\n\ |
167 -od<objdir> write object files to directory <objdir>\n\ | 167 -od<objdir> write object files to directory <objdir>\n\ |
319 global.params.useInlineAsm = 1; | 319 global.params.useInlineAsm = 1; |
320 | 320 |
321 // Predefine version identifiers | 321 // Predefine version identifiers |
322 #if IN_LLVM | 322 #if IN_LLVM |
323 VersionCondition::addPredefinedGlobalIdent("LLVM"); | 323 VersionCondition::addPredefinedGlobalIdent("LLVM"); |
324 VersionCondition::addPredefinedGlobalIdent("LLVMDC"); | 324 VersionCondition::addPredefinedGlobalIdent("LDC"); |
325 #endif | 325 #endif |
326 | 326 |
327 // setup default target os to be build os | 327 // setup default target os to be build os |
328 #if _WIN32 | 328 #if _WIN32 |
329 global.params.os = OSWindows; | 329 global.params.os = OSWindows; |
341 | 341 |
342 //VersionCondition::addPredefinedGlobalIdent("D_Bits"); | 342 //VersionCondition::addPredefinedGlobalIdent("D_Bits"); |
343 VersionCondition::addPredefinedGlobalIdent("all"); | 343 VersionCondition::addPredefinedGlobalIdent("all"); |
344 | 344 |
345 #if _WIN32 | 345 #if _WIN32 |
346 inifile(global.params.argv0, "llvmdc.ini"); | 346 inifile(global.params.argv0, "ldc.ini"); |
347 #elif POSIX | 347 #elif POSIX |
348 inifile(global.params.argv0, "llvmdc.conf"); | 348 inifile(global.params.argv0, "ldc.conf"); |
349 #else | 349 #else |
350 #error | 350 #error |
351 #endif | 351 #endif |
352 getenv_setargv("DFLAGS", &argc, &argv); | 352 getenv_setargv("DFLAGS", &argc, &argv); |
353 | 353 |
714 } | 714 } |
715 else if (!global.params.noDefaultLib) | 715 else if (!global.params.noDefaultLib) |
716 { | 716 { |
717 char *arg; | 717 char *arg; |
718 arg = (char *)mem.malloc(64); | 718 arg = (char *)mem.malloc(64); |
719 strcpy(arg, "-lllvmdc-runtime"); | 719 strcpy(arg, "-lldc-runtime"); |
720 global.params.linkswitches->push(arg); | 720 global.params.linkswitches->push(arg); |
721 arg = (char *)mem.malloc(64); | 721 arg = (char *)mem.malloc(64); |
722 strcpy(arg, "-ltango-cc-tango"); | 722 strcpy(arg, "-ltango-cc-tango"); |
723 global.params.linkswitches->push(arg); | 723 global.params.linkswitches->push(arg); |
724 arg = (char *)mem.malloc(64); | 724 arg = (char *)mem.malloc(64); |