Mercurial > projects > ldc
comparison gen/linker.cpp @ 567:aaba4f7c6d8a
Get rid of runtime path. Allow defaultlib and debuglib switches to be given multiple times.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Tue, 02 Sep 2008 19:14:25 +0200 |
parents | c23f4cfe4f2b |
children | 29dc68c949b0 |
comparison
equal
deleted
inserted
replaced
562:1ada9c6865df | 567:aaba4f7c6d8a |
---|---|
167 { | 167 { |
168 char *p = (char *)global.params.objfiles->data[i]; | 168 char *p = (char *)global.params.objfiles->data[i]; |
169 args.push_back(p); | 169 args.push_back(p); |
170 } | 170 } |
171 | 171 |
172 // runtime library | |
173 // must be linked in last to null terminate the moduleinfo appending list | |
174 std::string runtime_path(global.params.runtimePath); | |
175 | |
176 // path seperator can be \ on windows, but we check for / | |
177 #if _WIN32 | |
178 int i=0; | |
179 while ((i = runtime_path.find("\\", i)) > 0) | |
180 runtime_path.replace(i, 1, "/"); | |
181 #endif | |
182 | |
183 if (*runtime_path.rbegin() != '/') | |
184 runtime_path.append("/"); | |
185 runtime_path.append("libtango-base-llvmdc-native.a"); | |
186 args.push_back(runtime_path.c_str()); | |
187 | |
188 // print link command? | 172 // print link command? |
189 if (!global.params.quiet || global.params.verbose) | 173 if (!global.params.quiet || global.params.verbose) |
190 { | 174 { |
191 // Print it | 175 // Print it |
192 for (int i = 0; i < args.size(); i++) | 176 for (int i = 0; i < args.size(); i++) |