I am attempting to build the V8 Javascript engine with Clang and output an .ll
file(s). I am trying to combine the information here and here to do this. However, when I try to make
, it fails, saying "No rule to make target." I am lost. I've tried just compiling v8.cc, but that just totally fails. I imagine it's because I'm trying to force -emit-llvm
by putting it in as the compiler, but I'm not sure.
$ cd v8
$ export CXX="clang++ -S -emit-llvm"
$ export CC="clang -S -emit-llvm"
$ export CPP="clang -E -S -emit-llvm"
$ export LINK="clang++ -S -emit-llvm"
$ export CXX_host="clang++ -S -emit-llvm"
$ export CC_host="clang -S -emit-llvm"
$ export CPP_host="clang -E -S -emit-llvm"
$ export LINK_host="clang++ -S -emit-llvm"
$ export GYP_DEFINES="clang=1"
$ make native
PYTHONPATH="/home/pitaj/v8/tools/generate_shim_headers:/home/pitaj/v8/build::/home/pitaj/v8/build/gyp/pylib:" \
GYP_GENERATORS=make \
build/gyp/gyp --generator-output="out" build/all.gyp \
-Ibuild/standalone.gypi --depth=. -S.native -Dv8_enable_backtrace=1 -Darm_fpu=default -Darm_float_abi=default
make[1]: Entering directory `/home/pitaj/v8/out'
CXX(target) /home/pitaj/v8/out/native/obj.target/v8_base/src/accessors.o
... (bunch more CXX calls, full output here) ...
CXX(target) /home/pitaj/v8/out/native/obj.target/v8_base/src/utils.o
make[1]: *** No rule to make target `/home/pitaj/v8/out/native/obj.target/v8_base/src/v8.o', needed by `/home/pitaj/v8/out/native/obj.target/tools/gyp/libv8_base.a'. Stop.
make[1]: Leaving directory `/home/pitaj/v8/out'
make: *** [native] Error 2
EDIT:
Makefile: http://pastebin.com/PsZrCkzE
EDIT2:
The following builds v8 without errors, but obviously doesn't emit any IR.
$ cd v8
$ export CXX="clang++"
$ export CC="clang"
$ export CPP="clang -E"
$ export LINK="clang++"
$ export CXX_host="clang++"
$ export CC_host="clang"
$ export CPP_host="clang -E"
$ export LINK_host="clang++"
$ export GYP_DEFINES="clang=1"
$ make native