flang-compiler / f18

F18 is a front-end for Fortran intended to replace the existing front-end in the Flang compiler
230 stars 48 forks source link

Support platforms without strerror_r #1068

Closed isuruf closed 4 years ago

isuruf commented 4 years ago

Fixed #1064

isuruf commented 4 years ago

Code taken from https://github.com/llvm/llvm-project/blob/3b984641a73780cac80c04610158c8167a8a786c/llvm/lib/Support/Errno.cpp

CarolineConcatto commented 4 years ago

Question, the use of llvm::sys::StrError instead of std::strerror solve that problem?

isuruf commented 4 years ago

@klausler mentioned that they don't want LLVM libraries linked into the Fortran runtime which is why I'm copying that function instead of using it.

DavidTruby commented 4 years ago

Could you put a comment in the source referring to where this code comes from? I think we need a visible trail we can follow back in future!

isuruf commented 4 years ago

Squashed. Tests pass now