CHERIoT-Platform / llvm-project

Fork of LLVM adding CHERIoT, based on the CHERI LLVM fork
4 stars 6 forks source link

Clang `__builtin_strlen` is expanded with the wrong calling convention. #29

Closed davidchisnall closed 5 months ago

davidchisnall commented 5 months ago

The std::string constructor calls a strlen builtin. This ends up being expanded to a strlen call without the matching calling convention and so results in link failures.

davidchisnall commented 5 months ago

There are two related issues here:

Clang can give it whatever name you want if you provide a prototype here, so I believe the right solution is to treat these as separate bugs and: