Changeset 1187:a95fc9fcad5c
- Timestamp:
- 03/31/09 18:52:31
(3 years ago)
- Author:
- Frits van Bommel <fvbommel wxs.nl>
- branch:
- default
- Message:
Make sure -defaultlib and -debuglib don't get cut off if longer than 63 chars,
and clean up some overly verbose code.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1170 |
r1187 |
|
| 274 | 274 | for (int i = 0; i < libs->dim; i++) |
|---|
| 275 | 275 | { |
|---|
| 276 | | char *arg = (char *)mem.malloc(64); |
|---|
| | 276 | char* lib = (char *)libs->data[i]; |
|---|
| | 277 | char *arg = (char *)mem.malloc(strlen(lib) + 3); |
|---|
| 277 | 278 | strcpy(arg, "-l"); |
|---|
| 278 | | strncat(arg, (char *)libs->data[i], 64); |
|---|
| | 279 | strcpy(arg+2, lib); |
|---|
| 279 | 280 | global.params.linkswitches->push(arg); |
|---|
| 280 | 281 | } |
|---|
| … | … | |
| 282 | 283 | else if (!noDefaultLib) |
|---|
| 283 | 284 | { |
|---|
| 284 | | char *arg; |
|---|
| 285 | | arg = (char *)mem.malloc(64); |
|---|
| 286 | | strcpy(arg, "-lldc-runtime"); |
|---|
| 287 | | global.params.linkswitches->push(arg); |
|---|
| 288 | | arg = (char *)mem.malloc(64); |
|---|
| 289 | | strcpy(arg, "-ltango-cc-tango"); |
|---|
| 290 | | global.params.linkswitches->push(arg); |
|---|
| 291 | | arg = (char *)mem.malloc(64); |
|---|
| 292 | | strcpy(arg, "-ltango-gc-basic"); |
|---|
| 293 | | global.params.linkswitches->push(arg); |
|---|
| | 285 | global.params.linkswitches->push(mem.strdup("-lldc-runtime")); |
|---|
| | 286 | global.params.linkswitches->push(mem.strdup("-ltango-cc-tango")); |
|---|
| | 287 | global.params.linkswitches->push(mem.strdup("-ltango-gc-basic")); |
|---|
| 294 | 288 | // pass the runtime again to resolve issues |
|---|
| 295 | 289 | // with linking order |
|---|
| 296 | | arg = (char *)mem.malloc(64); |
|---|
| 297 | | strcpy(arg, "-lldc-runtime"); |
|---|
| 298 | | global.params.linkswitches->push(arg); |
|---|
| | 290 | global.params.linkswitches->push(mem.strdup("-lldc-runtime")); |
|---|
| 299 | 291 | } |
|---|
| 300 | 292 | |
|---|