Skip to content

Commit 2927987

Browse files
committed
Added some explanation of the wllvm-as and how we use it.
1 parent 20ae947 commit 2927987

File tree

2 files changed

+30
-13
lines changed

2 files changed

+30
-13
lines changed

wllvm/as.py

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
11
#!/usr/bin/env python
2-
"""
3-
This is the assembler phase.
4-
5-
This variant is only invoked during
6-
the second compilation where we are building bitcode. The compiler
7-
has already been instructed to generate LLVM IR; the compiler then
8-
tries to assemble it into an object file. The standard assembler
9-
doesn't understand LLVM bitcode, so we interpose and use the llvm-as
10-
command to build a bitcode file. We leave the bitcode in place, but
11-
record its full absolute path in the corresponding object file
12-
(which was created in the first compilation phase by the real
13-
compiler). We'll link this together at a later stage.
2+
"""This is the assembler phase.
3+
4+
This variant is only invoked during the second compilation where we
5+
are building bitcode. The compiler has already been instructed to
6+
generate LLVM IR; the compiler then tries to assemble it into an
7+
object file. The standard assembler doesn't understand LLVM bitcode,
8+
so we interpose and use the llvm-as command to build a bitcode file.
9+
We leave the bitcode in place, but record its full absolute path in
10+
the corresponding object file (which was created in the first
11+
compilation phase by the real compiler). We'll link this together at
12+
a later stage.
13+
14+
In the pip version the main below is a console script called wllvm-as.
15+
Since we cannot tell gcc what our assember is called, only which directory
16+
it should look for as in, we have to make a "hidden" directory that we
17+
can use to pass gcc. It needs to be hidden since we do not want our
18+
assembler to override the users assembler.
19+
20+
This should explain:
21+
22+
../dragonegg_as/as
23+
24+
in the pip egg, and in the repository.
25+
26+
1427
"""
1528

1629
from __future__ import absolute_import

wllvm/version.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@
77
Version History:
88
99
1.0.0 - 8/2/2016 initial birth as a pip package.
10+
1011
1.0.1 - 8/2/2016 the rst gets a make over, and doc strings
1112
became more pervasive.
13+
1214
1.0.2 - 8/2/2016 dragonegg issues. trying to include a polite 'as' wrapper
1315
(i.e. not a console_script called as).
1416
17+
1.0.3 - 8/2/2016 travis build fixes.
18+
1519
1620
1721
1822
"""
19-
wllvm_version='1.0.3dev0'
23+
wllvm_version='1.0.3'
2024

0 commit comments

Comments
 (0)