This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Add an option to disable the use of __ulock_wait
AbandonedPublic

Authored by Mordante on Feb 9 2023, 3:59 PM.

Details

Reviewers
ldionne
thakis
bc-lee
Group Reviewers
Restricted Project
Summary

__ulock_wait / __ulock_wake are considered private APIs and
their use will result in rejection from the App Store.
libc++ comes natively on Apple platforms, but some projects
prefer to static link their own libc++ builds.

So, add a CMake option to disable the use of __ulock_wait
on Apple platforms.

Also fix an issue where __ulock_wait code-path is actually not used
due to a missing include.

Diff Detail

Event Timeline

bc-lee created this revision.Feb 9 2023, 3:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 9 2023, 3:59 PM
bc-lee requested review of this revision.Feb 9 2023, 3:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 9 2023, 3:59 PM
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald Transcript
ldionne requested changes to this revision.Feb 10 2023, 9:56 AM

When shipping on the App Store, you should be using the system-provided libc++. There are various reasons for that, but long story short it'll make your app a good citizen in the ecosystem.

Is there a reason why you're going for a static link instead? If you are not careful, I can imagine various ways this could behave unexpectedly.

This revision now requires changes to proceed.Feb 10 2023, 9:56 AM

When shipping on the App Store, you should be using the system-provided libc++. There are various reasons for that, but long story short it'll make your app a good citizen in the ecosystem.

Is there a reason why you're going for a static link instead? If you are not careful, I can imagine various ways this could behave unexpectedly.

As I wrote in the issue (https://github.com/llvm/llvm-project/issues/60466), there are already some projects that do this. But I'm not speaking on behalf of those projects.

@thakis , can you explain why chromium uses static libc++ on Apple platforms?

Mordante commandeered this revision.Aug 31 2023, 12:29 PM
Mordante added a reviewer: bc-lee.
Mordante added a subscriber: Mordante.

This patch is inactive for quite a while. We're moving to GitHub and want to clean up the patch review queue. If you want to pursue this patch, please file a new patch as GitHub PR. I'll close the patch for now,

Mordante abandoned this revision.Aug 31 2023, 12:29 PM