1 |
2016-06-30 15:48 GMT+08:00 Luca Barbato <lu_zero@g.o>: |
2 |
> On 29/06/16 17:52, Lei Zhang wrote: |
3 |
>> Plan for today: |
4 |
>> - investigate clang's poor performance |
5 |
>> - study catalyst and stuff |
6 |
>> |
7 |
>> Progress: |
8 |
>> - I find out that optimization flags are not correctly passed to |
9 |
>> compiler when building the freestanding clang. The cause is a bit |
10 |
>> complicated: |
11 |
>> |
12 |
>> clang has to be built in-tree (i.e. along with LLVM); compiler-rt can |
13 |
>> be built out-of-tree, but it's a little inconvenient so I also built |
14 |
>> it in-tree. This means clang, compiler-rt and LLVM are built |
15 |
>> all-together. compiler-rt's sanitizer has some issue with musl, so I |
16 |
>> disabled building the sanitizer via some option. It turns out this |
17 |
>> option somehow leads cmake to forget passing optimization flags to |
18 |
>> compiler. The solution is simple: build compiler-rt out-of-tree. Or I |
19 |
>> can resolve the issue between compiler-rt's sanitizer and musl, when |
20 |
>> I've got time... |
21 |
> |
22 |
> Sounds a good plan =) |
23 |
|
24 |
I just found that compiler-rt is built as part of clang/LLVM in the |
25 |
default ebuilds. Perhaps I should leave it that way: not to create a |
26 |
new package for compiler-rt. That means compiler-rt still needs to be |
27 |
built in-tree, and I'll have to deal with the optimization flag issue. |
28 |
|
29 |
I also noticed that gcc's sanitizer doesn't work on the musl based |
30 |
system, so is it forgivable to not support clang's sanitizer either? |
31 |
(clang's sanitizer is implemented in compiler-rt) |
32 |
|
33 |
|
34 |
Lei |