This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Add target specific overrides for lgamma family functions
AbandonedPublic

Authored by jgravelle-google on Feb 8 2017, 4:01 PM.

Details

Reviewers
dschuff
sunfish
Summary

Current WebAssembly implementations use musl libc, which writes to
signgam in its lgamma functions. We want the rest of the builtins to be
const under -fno-math-errno, so overwrite lgamma's builtin definitions
to be never-const.

Event Timeline

It doesn't make sense to do this in WebAssembly-specific code; every POSIX platform has a signgam which behaves the same way.

https://clang.llvm.org/compatibility.html doesn't mention anything about POSIX, only C11 compliance, so I didn't think Clang in general cared about POSIX.
That being said I can definitely agree that Clang shouldn't preclude POSIX. I'll open a more-general diff.

jgravelle-google abandoned this revision.May 1 2017, 9:46 AM