comparison gen/toir.cpp @ 594:e096a1502428

Fix #88 : pragma(lib, "str") is now converted to -lstr in the linker command line.
author Christian Kamm <kamm incasoftware de>
date Sun, 14 Sep 2008 14:36:11 +0200
parents 5fb7ed0ac580
children 4435f57956e7
comparison
equal deleted inserted replaced
593:7042d912767e 594:e096a1502428
19 #include "init.h" 19 #include "init.h"
20 #include "mtype.h" 20 #include "mtype.h"
21 #include "template.h" 21 #include "template.h"
22 #include "hdrgen.h" 22 #include "hdrgen.h"
23 #include "port.h" 23 #include "port.h"
24 #include "mem.h"
24 25
25 #include "gen/irstate.h" 26 #include "gen/irstate.h"
26 #include "gen/logger.h" 27 #include "gen/logger.h"
27 #include "gen/tollvm.h" 28 #include "gen/tollvm.h"
28 #include "gen/llvmhelpers.h" 29 #include "gen/llvmhelpers.h"
2549 { 2550 {
2550 assert(0); 2551 assert(0);
2551 return 0; 2552 return 0;
2552 } 2553 }
2553 2554
2554 void obj_includelib(char*) 2555 void obj_includelib(char* lib)
2555 { 2556 {
2556 // FIXME: we want to support pragma(lib) 2557 char *arg = (char *)mem.malloc(64);
2558 strcpy(arg, "-l");
2559 strncat(arg, lib, 64);
2560 global.params.linkswitches->push(arg);
2557 } 2561 }
2558 2562
2559 void backend_init() 2563 void backend_init()
2560 { 2564 {
2561 // now lazily loaded 2565 // now lazily loaded