This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Do not use futex if LIBCXX_HAS_MUSL_LIBC is ON
AbandonedPublic

Authored by pzheng on Mar 23 2020, 11:01 AM.

Details

Reviewers
__simt__
apazos
bcain
sidneym
Group Reviewers
Restricted Project
Summary

Futex is not available with musl libc.

Diff Detail

Event Timeline

pzheng created this revision.Mar 23 2020, 11:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2020, 11:01 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript

What does the Linux syscall have to do with MUSL?

Is the C library calling dibs on the entire platform?

The build actually fails because of "#include <linux/futex.h>". Musl does not have this header file and the build fails with a missing header file error.

bcain added a comment.Mar 23 2020, 2:37 PM

The build actually fails because of "#include <linux/futex.h>". Musl does not have this header file and the build fails with a missing header file error.

Maybe that header is supposed to come from the kernel and not the C library.

pzheng abandoned this revision.Mar 23 2020, 3:46 PM

The build actually fails because of "#include <linux/futex.h>". Musl does not have this header file and the build fails with a missing header file error.

Maybe that header is supposed to come from the kernel and not the C library.

You are right! This is actually from the linux kernel and not from glibc or musl. Thanks for pointing this out.