Mercurial > projects > ddmd
comparison buildHelper.d @ 180:0622fff7810a
Fixed a few memory allocation related issues
author | korDen |
---|---|
date | Sun, 17 Oct 2010 23:23:28 +0400 |
parents | 5a9a88e919f9 |
children | 190ba98276b3 |
comparison
equal
deleted
inserted
replaced
179:cd48cb899aee | 180:0622fff7810a |
---|---|
6 import std.process; | 6 import std.process; |
7 import std.stdio; | 7 import std.stdio; |
8 import std.string: replace, format; | 8 import std.string: replace, format; |
9 import std.zip; | 9 import std.zip; |
10 | 10 |
11 enum dmdVersionDefault = "2.039"; | 11 enum dmdVersionDefault = "2.040"; |
12 enum dmdArchiveBaseURL = "http://ftp.digitalmars.com/"; | 12 enum dmdArchiveBaseURL = "http://ftp.digitalmars.com/"; |
13 enum dmdLib = "dmd.lib"; | 13 enum dmdLib = "dmd.lib"; |
14 version(Windows) | 14 version(Windows) |
15 { | 15 { |
16 enum scriptName = "build.bat"; | 16 enum scriptName = "build.bat"; |
163 | 163 |
164 // Make mars2.c with 'main' hidden | 164 // Make mars2.c with 'main' hidden |
165 doChDir("dmd2/src/dmd"); | 165 doChDir("dmd2/src/dmd"); |
166 copyAndPatch("mars.c", "mars2.c", (ref string data) { | 166 copyAndPatch("mars.c", "mars2.c", (ref string data) { |
167 data = data.replace("int main(int argc, char *argv[])", "int HIDE_main(int argc, char *argv[])"); | 167 data = data.replace("int main(int argc, char *argv[])", "int HIDE_main(int argc, char *argv[])"); |
168 }); | |
169 | |
170 copyAndPatch("util.c", "util.c", (ref string data) { | |
171 data = data.replace("void util_assert(char *file,int line)", "void HIDE_util_assert(char *file,int line)"); | |
168 }); | 172 }); |
169 | 173 |
170 // Apply patch | 174 // Apply patch |
171 doChDir("../../.."); | 175 doChDir("../../.."); |
172 doChDir("dmd2"); | 176 doChDir("dmd2"); |