SRI-CSL / whole-program-llvm

A toolkit for building whole-program LLVM bitcode files
MIT License
73 stars 11 forks source link

-emit-llvm #18

Closed ianamason closed 7 years ago

ianamason commented 7 years ago

Write a simple example that uses -emit-llvm to compile a bunch of .c's into .bc's then links them into a exe either by way of intermediate .o's or directly, and see if we can handle it correctly.

ianamason commented 7 years ago

Just waiting now for some stress tests. Perhaps by @relentless-warrior

relentless-warrior commented 7 years ago

@ianamason: Overwhelmed with another project until tomorrow evening. I will try it tomorrow (Friday) night and let you know.

ianamason commented 7 years ago

no problem @relentless-warrior, just wanted you to know that there is something there for you to test if so inclined.

ianamason commented 7 years ago

We should also see if we have fixed the issues Marko @mdimjasevic was having.

https://dimjasevic.net/marko/2015/11/09/getting-llvm-bitcode-with-clang-from-android-take-ii/

mdimjasevic commented 7 years ago

That was quite a while ago and I believe with the original version of WLLVM. In the meantime I moved onto other projects, i.e. I'm not working with WLLVM anymore.

relentless-warrior commented 7 years ago

@ianamason: wllvm works correctly for a couple of .c files. Here is the Makefile that I have used for my testing:

##################################
CC = wllvm
all: hello
hello: a.o b.o
    $(CC) a.o b.o -o hello
a.o: a.c
    $(CC) -c a.c
b.o: b.c
    $(CC) -c b.c
clean:
    rm -f *o hello
####################################

I have then used the extract-bc script to extract the .bc from the hello exe file.

ianamason commented 7 years ago

Yes I have a whole bunch of tests like that in my fork. I was hoping you were going to build the bluetooth library. See if that works :-)

ianamason commented 7 years ago

Fixed but not tested on anything other than toy examples.