Mercurial > projects > ldc
comparison gen/linker.cpp @ 325:3c8c58c24aa8 trunk
[svn r346] Fixed #55 - llvmdc can link as fast as dmd now!
Made runtime to compile to native by default. Changed linker.cpp to link in native runtime library.
This change requires a runtime rebuild as well as a new symbolic link in lib/ to tango/lib/libtango-base-llvmdc-native.a.
author | ChristianK |
---|---|
date | Thu, 10 Jul 2008 19:38:34 +0200 |
parents | 0baca2feb554 |
children | 6788e98ec1cd |
comparison
equal
deleted
inserted
replaced
324:c542d12017e5 | 325:3c8c58c24aa8 |
---|---|
148 char *p = (char *)global.params.libfiles->data[i]; | 148 char *p = (char *)global.params.libfiles->data[i]; |
149 args.push_back(p); | 149 args.push_back(p); |
150 } | 150 } |
151 | 151 |
152 // default libs | 152 // default libs |
153 args.push_back("-ltango-base-c-llvmdc"); | |
154 args.push_back("-lpthread"); | 153 args.push_back("-lpthread"); |
155 args.push_back("-ldl"); | 154 args.push_back("-ldl"); |
156 args.push_back("-lm"); | 155 args.push_back("-lm"); |
157 | 156 |
158 // object files | 157 // object files |
165 // runtime library | 164 // runtime library |
166 // must be linked in last to null terminate the moduleinfo appending list | 165 // must be linked in last to null terminate the moduleinfo appending list |
167 std::string runtime_path(global.params.runtimePath); | 166 std::string runtime_path(global.params.runtimePath); |
168 if (*runtime_path.rbegin() != '/') | 167 if (*runtime_path.rbegin() != '/') |
169 runtime_path.append("/"); | 168 runtime_path.append("/"); |
170 runtime_path.append("libtango-base-llvmdc.a"); | 169 runtime_path.append("libtango-base-llvmdc-native.a"); |
171 args.push_back(runtime_path.c_str()); | 170 args.push_back(runtime_path.c_str()); |
172 | 171 |
173 // print link command? | 172 // print link command? |
174 if (!global.params.quiet || global.params.verbose) | 173 if (!global.params.quiet || global.params.verbose) |
175 { | 174 { |