Rev 3 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3 | Rev 9 | ||
---|---|---|---|
Line 12... | Line 12... | ||
12 | in the LLVM codebase (mostly because of the very long iteration times that |
12 | in the LLVM codebase (mostly because of the very long iteration times that |
13 | rebuilding LLVM causes, even when using a compiler cache.) |
13 | rebuilding LLVM causes, even when using a compiler cache.) |
14 | 14 | ||
15 | Why does Clang chain-call gcc with the intent of linking ? Because GNU GCC is |
15 | Why does Clang chain-call gcc with the intent of linking ? Because GNU GCC is |
16 | itself a 'driver' which can also invoke either a compiler or a linker ('gcc' |
16 | itself a 'driver' which can also invoke either a compiler or a linker ('gcc' |
- | 17 | invokes 'cc1' or 'cc1plus', the actual compiler, depending on the language, |
|
17 |
|
18 | then runs 'collect2' which in turn invokes 'ld', the UNIX linker). This means |
18 | our drop-in GCC replacement will need to either chain-call 'clang' when it is |
19 | our drop-in GCC replacement will need to either chain-call 'clang' when it is |
19 | called with the intent of *compiling* and chain-call ld' when it is called |
20 | called with the intent of *compiling* and chain-call 'ld' when it is called |
20 | with the intent of *linking*. This can be decided by looking at its command- |
21 | with the intent of *linking*. This can be decided by looking at its command- |
21 | line arguments. |
22 | line arguments. |
22 | 23 | ||
23 | How will our drop-in gcc replacement know how to call 'ld' correctly ? Because |
24 | How will our drop-in gcc replacement know how to call 'ld' correctly ? Because |
24 | when proper support is added to it, GNU GCC contains a 'linker specification' |
25 | when proper support is added to it, GNU GCC contains a 'linker specification' |