|
170 | 170 | beta, there are no guarantees and there is no support for it at this time.
|
171 | 171 | It has been reported that VC++ Express also works.</p>
|
172 | 172 |
|
173 |
| - <p>You will also need several open source packages: bison, flex, and sed. |
174 |
| - These must be installed in <tt>llvm/win32/tools</tt>. These can be found at |
175 |
| - <a href="http://gnuwin32.sourceforge.net">http://gnuwin32.sourceforge.net</a> |
176 |
| - or |
177 |
| - <a href="http://unxutils.sourceforge.net">http://unxutils.sourceforge.net</a>. |
178 |
| - Bison prefers that m4 be in the path. You must add it to the Visual Studio |
179 |
| - configuration under the menu Options -> Projects -> VC++ Directories. |
180 |
| - Alternatively, you can set the environment variable <tt>M4</tt> to point to |
181 |
| - <tt>m4</tt> executable.</p> |
| 173 | + <p>If you plan to modify any .y or .l files, you will need to have bison |
| 174 | + and/or flex installed where Visual Studio can find them. Otherwise, you do |
| 175 | + not need them and the pre-generated files that come with the source tree |
| 176 | + will be used.</p> |
182 | 177 |
|
183 | 178 | </div>
|
184 | 179 |
|
|
279 | 274 | <p><b>Note: while you cannot do this step on Windows, you can do it on a
|
280 | 275 | Unix system and transfer <tt>hello.bc</tt> to Windows.</b></p></li>
|
281 | 276 |
|
282 |
| - <li><p>Run the program. To make sure the program ran, execute the |
283 |
| - following command:</p> |
| 277 | + <li><p>Run the program using the just-in-time compiler:</p> |
284 | 278 |
|
285 | 279 | <p><tt>% lli hello.bc</tt></p></li>
|
286 | 280 |
|
287 | 281 | <li><p>Use the <tt>llvm-dis</tt> utility to take a look at the LLVM assembly
|
288 | 282 | code:</p>
|
289 | 283 |
|
290 |
| - <p><tt>% llvm-dis < hello.bc | less</tt><p></li> |
| 284 | + <p><tt>% llvm-dis < hello.bc | more</tt><p></li> |
291 | 285 |
|
292 |
| - <li><p>Compile the program to native assembly using the LLC code |
293 |
| - generator:</p> |
| 286 | + <li><p>Compile the program to C using the LLC code generator:</p> |
294 | 287 |
|
295 |
| - <p><tt>% llc hello.bc -o hello.s</tt></p> |
| 288 | + <p><tt>% llc -march=c hello.bc</tt></p></li> |
296 | 289 |
|
297 |
| - <li><p>Assemble the native assembly language file into a program:</p> |
| 290 | + <li><p>Compile to binary using Microsoft C:</p> |
298 | 291 |
|
299 |
| - <p><b>Not currently possible, but eventually will use <tt>NASMW</tt>.</b></p> |
| 292 | + <p><tt>% cl hello.cbe.c</tt></p></li> |
300 | 293 |
|
301 | 294 | <li><p>Execute the native code program:</p>
|
302 | 295 |
|
303 |
| - <p><tt>% ./hello.native</tt></p></li> |
| 296 | + <p><tt>% hello.cbe.exe</tt></p></li> |
304 | 297 |
|
305 | 298 | </ol>
|
306 | 299 |
|
|
0 commit comments