comparison builder.d @ 32:705817d8514a

Pass -g flag to dmd for compiles rather than links.
author David Bryant <bagnose@gmail.com>
date Sun, 30 Aug 2009 01:33:34 +0930
parents 4a688da41f1a
children b6c34f1fc7f3
comparison
equal deleted inserted replaced
31:fe66a856a630 32:705817d8514a
30 // static import module_name; 30 // static import module_name;
31 // static import module_alias = module_name; 31 // static import module_alias = module_name;
32 // specifically, the module-name has to be the last thing on the line. 32 // specifically, the module-name has to be the last thing on the line.
33 // 33 //
34 // 34 //
35 // The directory structure employs a heirarchy of: 35 // The directory structure employs a hierarchy of:
36 // * Bundle - A collection of products. Has no source code of its own, and does not appear in package paths. 36 // * Bundle - A collection of products. Has no source code of its own, and does not appear in package paths.
37 // Corresponds to the root of a checkout/repository. The bundle is on the source search path. 37 // Corresponds to the root of a checkout/repository. The bundle is on the source search path.
38 // * Product - Top-level package, usually to provide namespace, but can also contain code 38 // * Product - Top-level package, usually to provide namespace, but can also contain code
39 // just like lower-level packages. 39 // just like lower-level packages.
40 // * Package - A self-contained set of library code, executable code, docs, tests, etc. 40 // * Package - A self-contained set of library code, executable code, docs, tests, etc.
509 // an object file is built from its source 509 // an object file is built from its source
510 override void build() { 510 override void build() {
511 writefln("Object %s", mPath); 511 writefln("Object %s", mPath);
512 scope cmd = new StringFormatter; 512 scope cmd = new StringFormatter;
513 513
514 cmd.format("dmd -c"); 514 cmd.format("dmd -c -g");
515 foreach (path; Global.bundlePaths) { 515 foreach (path; Global.bundlePaths) {
516 cmd.format(" -I", path); 516 cmd.format(" -I", path);
517 } 517 }
518 cmd.format(" -od%s -of%s %s", dirname(mPath), basename(mPath), mSource.mPath); 518 cmd.format(" -od%s -of%s %s", dirname(mPath), basename(mPath), mSource.mPath);
519 cmd.format(" @%s", Global.optionsPath); 519 cmd.format(" @%s", Global.optionsPath);
595 // the object needs, transitively 595 // the object needs, transitively
596 override void build() { 596 override void build() {
597 writefln("Program %s", mPath); 597 writefln("Program %s", mPath);
598 scope cmd = new StringFormatter(); 598 scope cmd = new StringFormatter();
599 599
600 cmd.format("dmd -g -L-L%s", join(Global.buildPath, "lib")); 600 cmd.format("dmd -L-L%s", join(Global.buildPath, "lib"));
601 cmd.format(" -of%s %s", mPath, mObject.mPath); 601 cmd.format(" -of%s %s", mPath, mObject.mPath);
602 602
603 // add the libraries we need 603 // add the libraries we need
604 LibraryItem[] libs; 604 LibraryItem[] libs;
605 foreach (item; mDepends) { 605 foreach (item; mDepends) {