Mercurial > projects > ldc
comparison dmd/mars.c @ 651:5709381df7e8
Added -nodefaultlib switch do disable implicitly linked standard lib modules
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Sun, 05 Oct 2008 18:55:43 +0200 |
parents | 94b01f15814f |
children | 50383e476c7e |
comparison
equal
deleted
inserted
replaced
650:aa6a0b7968f7 | 651:5709381df7e8 |
---|---|
222 Path options:\n\ | 222 Path options:\n\ |
223 -I<path> where to look for imports\n\ | 223 -I<path> where to look for imports\n\ |
224 -J<path> where to look for string imports\n\ | 224 -J<path> where to look for string imports\n\ |
225 -defaultlib=name set default library for non-debug build\n\ | 225 -defaultlib=name set default library for non-debug build\n\ |
226 -debuglib=name set default library for debug build\n\ | 226 -debuglib=name set default library for debug build\n\ |
227 -nodefaultlib don't add a default library for linking implicitly\n\ | |
227 \n\ | 228 \n\ |
228 Misc options:\n\ | 229 Misc options:\n\ |
229 -v verbose\n\ | 230 -v verbose\n\ |
230 -vv very verbose (does not include -v)\n\ | 231 -vv very verbose (does not include -v)\n\ |
231 -quiet suppress unnecessary messages\n\ | 232 -quiet suppress unnecessary messages\n\ |
426 else | 427 else |
427 error("unrecognized feature '%s'", feature); | 428 error("unrecognized feature '%s'", feature); |
428 } | 429 } |
429 else if (strcmp(p + 1, "noasm") == 0) | 430 else if (strcmp(p + 1, "noasm") == 0) |
430 global.params.useInlineAsm = 0; | 431 global.params.useInlineAsm = 0; |
432 else if (strcmp(p + 1, "nodefaultlib") == 0) | |
433 global.params.noDefaultLib = 1; | |
431 else if (p[1] == 'o') | 434 else if (p[1] == 'o') |
432 { | 435 { |
433 switch (p[2]) | 436 switch (p[2]) |
434 { | 437 { |
435 case '-': | 438 case '-': |
707 strcpy(arg, "-l"); | 710 strcpy(arg, "-l"); |
708 strncat(arg, (char *)libs->data[i], 64); | 711 strncat(arg, (char *)libs->data[i], 64); |
709 global.params.linkswitches->push(arg); | 712 global.params.linkswitches->push(arg); |
710 } | 713 } |
711 } | 714 } |
712 else | 715 else if (!global.params.noDefaultLib) |
713 { | 716 { |
714 char *arg; | 717 char *arg; |
715 arg = (char *)mem.malloc(64); | 718 arg = (char *)mem.malloc(64); |
716 strcpy(arg, "-lllvmdc-runtime"); | 719 strcpy(arg, "-lllvmdc-runtime"); |
717 global.params.linkswitches->push(arg); | 720 global.params.linkswitches->push(arg); |