This is an archive of the discontinued LLVM Phabricator instance.

Repair support for launching iphone/tv/watch simulator binaries through platform
ClosedPublic

Authored by aprantl on Jun 16 2020, 4:31 PM.

Details

Summary

and delete a bunch (but not all) redundant code. If you compare the remaining implementations of Platform*Simulator.cpp, there is still an obvious leftover cleanup task.

Specifically, this patch

  • removes SDK initialization from dotest (there is equivalent but more complete code in Makefile.rules)
  • make Platform*Simulator inherit the generic implementation of PlatformAppleSimulator (more can be done here)
  • simplify the platform logic in Makefile.rules
  • replace the custom SDK finding logic in Platform*Simulator with XcodeSDK
  • adds a test for each supported simulator

Diff Detail

Event Timeline

aprantl created this revision.Jun 16 2020, 4:31 PM
aprantl updated this revision to Diff 271393.Jun 17 2020, 9:35 AM

Fix decorator usage.

aprantl updated this revision to Diff 271425.Jun 17 2020, 11:34 AM

Fix fallout from the Makefile.rules change by adapting a handful of manually written Makefiles.

vsk added a subscriber: vsk.Jun 18 2020, 10:40 AM

Generally this looks really nice!

lldb/packages/Python/lldbsuite/test/make/Makefile.rules
135

If I've read this correctly, this means we'll only sign when TRIPLE_OS == "macosx" && TRIPLE_ENV == "". Is that what we want, or should we be signing everything?

143

Can we just write xcrun --sdk $(SDK_NAME) --show-sdk-version?

If not, is the "-e" option to grep redundant, since there's only one pattern to match?

aprantl updated this revision to Diff 271877.Jun 18 2020, 4:41 PM
aprantl marked an inline comment as done.

Simplify version detection.

aprantl marked an inline comment as done.Jun 18 2020, 4:41 PM
aprantl added inline comments.
lldb/packages/Python/lldbsuite/test/make/Makefile.rules
135

This is preserving the old behavior, and IIUC code signing on macOS is just slowing things down with no advantage.

143

Yes, that's nicer!

aprantl updated this revision to Diff 271878.Jun 18 2020, 4:42 PM

Actually update the patch and not the diff from my previous patch.

vsk accepted this revision.Jun 18 2020, 9:39 PM
vsk added inline comments.
lldb/packages/Python/lldbsuite/test/make/Makefile.rules
135

Oh I see. We actually need this change to make sure things for watch/tv get signed. Earlier, I misread ifneq "$(TRIPLE_OS)" "macosx" as ifeq "$(TRIPLE_OS)" "macosx".

This revision is now accepted and ready to land.Jun 18 2020, 9:39 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 19 2020, 9:46 AM