comparison dmd/mars.c @ 159:5acec6b2eef8 trunk

[svn r175] merged dmd 1.029
author ChristianK
date Thu, 01 May 2008 15:15:28 +0200
parents d11848349f97
children 9d44ec83acd1
comparison
equal deleted inserted replaced
158:287540c5f05e 159:5acec6b2eef8
68 #error "fix this" 68 #error "fix this"
69 #endif 69 #endif
70 70
71 copyright = "Copyright (c) 1999-2008 by Digital Mars and Tomas Lindquist Olsen"; 71 copyright = "Copyright (c) 1999-2008 by Digital Mars and Tomas Lindquist Olsen";
72 written = "written by Walter Bright and Tomas Lindquist Olsen"; 72 written = "written by Walter Bright and Tomas Lindquist Olsen";
73 version = "v1.029";
73 llvmdc_version = "0.1"; 74 llvmdc_version = "0.1";
74 version = "v1.026";
75 global.structalign = 8; 75 global.structalign = 8;
76 76
77 memset(&params, 0, sizeof(Param)); 77 memset(&params, 0, sizeof(Param));
78 } 78 }
79 79
186 -Hd<hdrdir> write 'header' file to <hdrdir> directory\n\ 186 -Hd<hdrdir> write 'header' file to <hdrdir> directory\n\
187 -Hf<filename> write 'header' file to <filename>\n\ 187 -Hf<filename> write 'header' file to <filename>\n\
188 --help print help\n\ 188 --help print help\n\
189 -I<path> where to look for imports\n\ 189 -I<path> where to look for imports\n\
190 -J<path> where to look for string imports\n\ 190 -J<path> where to look for string imports\n\
191 -ignore ignore unsupported pragmas\n\
191 -inline do function inlining\n\ 192 -inline do function inlining\n\
192 -Llinkerflag pass linkerflag to link\n\ 193 -Llinkerflag pass linkerflag to link\n\
193 -m<arch> emit code specific to <arch>\n\ 194 -m<arch> emit code specific to <arch>\n\
194 x86 x86-64 ppc32 ppc64\n\ 195 x86 x86-64 ppc32 ppc64\n\
195 -nofloat do not emit reference to floating point\n\ 196 -nofloat do not emit reference to floating point\n\
199 -O<n> optimize at level <n> (0-5)\n\ 200 -O<n> optimize at level <n> (0-5)\n\
200 -o- do not write object file\n\ 201 -o- do not write object file\n\
201 -od<objdir> write object files to directory <objdir>\n\ 202 -od<objdir> write object files to directory <objdir>\n\
202 -of<filename> name output file to <filename>\n\ 203 -of<filename> name output file to <filename>\n\
203 -op do not strip paths from source file\n\ 204 -op do not strip paths from source file\n\
204 -profile profile runtime performance of generated code\n\ 205 -profile profile runtime performance of generated code\n\
205 -quiet suppress unnecessary messages\n\ 206 -quiet suppress unnecessary messages\n\
206 -release compile release version\n\ 207 -release compile release version\n\
207 -run srcfile args... run resulting program, passing args\n\ 208 -run srcfile args... run resulting program, passing args\n\
208 -R<path> provide path to the directory containing the runtime library\n\ 209 -R<path> provide path to the directory containing the runtime library\n\
209 -unittest compile in unit tests\n\ 210 -unittest compile in unit tests\n\
210 -v verbose\n\ 211 -v verbose\n\
211 -vv very verbose (does not include -v)\n\ 212 -vv very verbose (does not include -v)\n\
266 global.params.useSwitchError = 0; 267 global.params.useSwitchError = 0;
267 global.params.useInline = 0; // this one messes things up to a point where codegen breaks 268 global.params.useInline = 0; // this one messes things up to a point where codegen breaks
268 global.params.llvmInline = 0; // use this one instead to know if inline passes should be run 269 global.params.llvmInline = 0; // use this one instead to know if inline passes should be run
269 global.params.obj = 1; 270 global.params.obj = 1;
270 global.params.Dversion = 2; 271 global.params.Dversion = 2;
272 global.params.quiet = 1;
271 273
272 global.params.linkswitches = new Array(); 274 global.params.linkswitches = new Array();
273 global.params.libfiles = new Array(); 275 global.params.libfiles = new Array();
274 global.params.objfiles = new Array(); 276 global.params.objfiles = new Array();
275 global.params.ddocfiles = new Array(); 277 global.params.ddocfiles = new Array();
354 global.params.symdebug = 1; 356 global.params.symdebug = 1;
355 else if (strcmp(p + 1, "gc") == 0) 357 else if (strcmp(p + 1, "gc") == 0)
356 global.params.symdebug = 2; 358 global.params.symdebug = 2;
357 else if (strcmp(p + 1, "gt") == 0) 359 else if (strcmp(p + 1, "gt") == 0)
358 { error("use -profile instead of -gt\n"); 360 { error("use -profile instead of -gt\n");
359 global.params.trace = 1; 361 global.params.trace = 1;
360 } 362 }
361 else if (strcmp(p + 1, "profile") == 0) 363 else if (strcmp(p + 1, "profile") == 0)
362 global.params.trace = 1; 364 global.params.trace = 1;
363 else if (strcmp(p + 1, "v") == 0) 365 else if (strcmp(p + 1, "v") == 0)
364 global.params.verbose = 1; 366 global.params.verbose = 1;
474 default: 476 default:
475 goto Lerror; 477 goto Lerror;
476 } 478 }
477 } 479 }
478 #endif 480 #endif
481 else if (strcmp(p + 1, "ignore") == 0)
482 global.params.ignoreUnsupportedPragmas = 1;
479 else if (strcmp(p + 1, "inline") == 0) { 483 else if (strcmp(p + 1, "inline") == 0) {
480 // TODO 484 // TODO
481 // the ast rewrites dmd does for inlining messes up the ast. 485 // the ast rewrites dmd does for inlining messes up the ast.
482 // someday maybe we can support it, for now llvm does an excellent job at inlining 486 // someday maybe we can support it, for now llvm does an excellent job at inlining
483 global.params.useInline = 0; //1 487 global.params.useInline = 0; //1