Mercurial > projects > ldc
comparison gen/linker.cpp @ 407:723027dd9593
Fixed path seperator issue on windows in linker.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Sun, 27 Jul 2008 14:15:22 +0200 |
parents | a3f3c2770a0d |
children | 7e2867ed70d9 |
comparison
equal
deleted
inserted
replaced
406:94394be61589 | 407:723027dd9593 |
---|---|
170 } | 170 } |
171 | 171 |
172 // runtime library | 172 // runtime library |
173 // must be linked in last to null terminate the moduleinfo appending list | 173 // must be linked in last to null terminate the moduleinfo appending list |
174 std::string runtime_path(global.params.runtimePath); | 174 std::string runtime_path(global.params.runtimePath); |
175 | |
176 // path seperator can be \ on windows, but we check for / | |
177 if (global.params.isWindows) | |
178 { | |
179 int i=0; | |
180 while ((i = runtime_path.find("\\", i)) > 0) | |
181 runtime_path.replace(i, 1, "/"); | |
182 } | |
183 | |
175 if (*runtime_path.rbegin() != '/') | 184 if (*runtime_path.rbegin() != '/') |
176 runtime_path.append("/"); | 185 runtime_path.append("/"); |
177 runtime_path.append("libtango-base-llvmdc-native.a"); | 186 runtime_path.append("libtango-base-llvmdc-native.a"); |
178 args.push_back(runtime_path.c_str()); | 187 args.push_back(runtime_path.c_str()); |
179 | 188 |