From: Jeff Cohen
You will also need several open source packages: bison, flex, and sed. - These must be installed in llvm/win32/tools. These can be found at - http://gnuwin32.sourceforge.net - or - http://unxutils.sourceforge.net. - Bison prefers that m4 be in the path. You must add it to the Visual Studio - configuration under the menu Options -> Projects -> VC++ Directories. - Alternatively, you can set the environment variable M4 to point to - m4 executable.
+If you plan to modify any .y or .l files, you will need to have bison + and/or flex installed where Visual Studio can find them. Otherwise, you do + not need them and the pre-generated files that come with the source tree + will be used.
@@ -279,28 +274,26 @@ All these paths are absolute:Note: while you cannot do this step on Windows, you can do it on a Unix system and transfer hello.bc to Windows.
-Run the program. To make sure the program ran, execute the - following command:
+Run the program using the just-in-time compiler:
% lli hello.bc
Use the llvm-dis utility to take a look at the LLVM assembly code:
-% llvm-dis < hello.bc | less
% llvm-dis < hello.bc | more
-
Compile the program to native assembly using the LLC code - generator:
+Compile the program to C using the LLC code generator:
-% llc hello.bc -o hello.s
+% llc -march=c hello.bc
Assemble the native assembly language file into a program:
+Compile to binary using Microsoft C:
-Not currently possible, but eventually will use NASMW.
+% cl hello.cbe.c
Execute the native code program:
-% ./hello.native
% hello.cbe.exe