Page MenuHomePhabricator

Revert "[CodeGenModule] Set dso_local for Mach-O GlobalValue"
ClosedPublic

Authored by arphaman on Mar 11 2021, 2:57 PM.

Details

Summary

This reverts commit 809a1e0ffd7af40ee27270ff8ba2ffc927330e71.

Mach-O doesn't support dso_local and this change broke XNU because of the use of dso_local.

Diff Detail

Event Timeline

arphaman created this revision.Mar 11 2021, 2:57 PM
arphaman requested review of this revision.Mar 11 2021, 2:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 11 2021, 2:57 PM
MaskRay added a comment.EditedMar 11 2021, 3:00 PM

Mach-O doesn't support dso_local and this change broke XNU because of the use of dso_local.

Can you elaborate on the unsupportness? For example, the backend can ignore dso_local if it does not want to support it.

The main purpose is to reduce target differences: currently both COFF and ELF can use dso_local. If Mach-O doesn't like dso_local, there is an additional difference.

Mach-O doesn't support dso_local and this change broke XNU because of the use of dso_local.

Can you elaborate on the unsupportness? For example, the backend can ignore dso_local if it does not want to support it.

The main purpose is to reduce target differences: currently both COFF and ELF can use dso_local. If Mach-O doesn't like dso_local, there is an additional difference.

The model for dso_local is different on Mach-O. While it's a laudable goal to unify the three formats, we might want to consider to not push these changes willy-nilly.
We should consider investigating what's broken but the reality is that this breaks xnu so we need to revert this for the time being.

davide accepted this revision.Mar 11 2021, 3:39 PM

LGTM.

This revision is now accepted and ready to land.Mar 11 2021, 3:39 PM

+ Lang, who probably has a better understanding of this, for visibility.
I don't think this should be blocked further, but he might have a chance to comment.

MaskRay accepted this revision.Mar 11 2021, 3:50 PM
This revision was landed with ongoing or failed builds.Mar 17 2021, 5:27 PM
This revision was automatically updated to reflect the committed changes.