This is an archive of the discontinued LLVM Phabricator instance.

[compiler_rt] Add a seperate runtime for Mac Catalyst
AbandonedPublic

Authored by bc-lee on Jan 21 2022, 1:15 PM.

Details

Summary

Mac Catalyst has different platform fields in build_version_command,
so it's natural to create a separate libclang_rt.

Diff Detail

Event Timeline

bc-lee created this revision.Jan 21 2022, 1:15 PM
bc-lee requested review of this revision.Jan 21 2022, 1:15 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 21 2022, 1:15 PM
Herald added subscribers: Restricted Project, cfe-commits. · View Herald Transcript
bc-lee edited the summary of this revision. (Show Details)Jan 21 2022, 1:27 PM
bc-lee updated this revision to Diff 402201.Jan 22 2022, 3:48 AM
delcypher added 1 blocking reviewer(s): aralisza.Jan 26 2022, 6:18 PM

@bc-lee Thanks for the patch. While I get what you're trying to do I have doubts about being able to accept the patch in its current form. Apple's ASan catalyst doesn't work by building a separate dylib, instead it builds the macosx dylib in a different way to make it work with catalyst code.

I've made @aralisza a blocking reviewer because she'll need to approve this.

It may not be appropriate to add other runtime libraries specifically for Mac Catalyst. However, currently lld does not allow linking with dynamic libraries with different types of build_version_command, whereas ld64 does allow for Mac Catalyst. Considering compatibility with lld, Mac Catalyst’s runtime libraries need to be added also.

See my other patch https://reviews.llvm.org/D117925 for more details.

thakis added a subscriber: thakis.Jan 28 2022, 12:30 PM

It may not be appropriate to add other runtime libraries specifically for Mac Catalyst. However, currently lld does not allow linking with dynamic libraries with different types of build_version_command, whereas ld64 does allow for Mac Catalyst. Considering compatibility with lld

If lld doesn't support something we need, we should add support for the missing part to lld instead of working around it. Is there a bug on file for the missing lld bit?

bc-lee added a comment.Feb 2 2022, 2:50 PM

Some changes in this patch were applied as https://reviews.llvm.org/D118759, so I'm re-uploading this patch to get rid of merge conflicts.

bc-lee updated this revision to Diff 405461.Feb 2 2022, 2:51 PM
bc-lee edited the summary of this revision. (Show Details)