[lldb/AppleSimulator] Always provide a -simulator environment
authorFred Riss <friss@apple.com>
Fri, 24 Jul 2020 16:24:41 +0000 (09:24 -0700)
committerFred Riss <friss@apple.com>
Mon, 27 Jul 2020 19:50:50 +0000 (12:50 -0700)
commit4c6eebf86a0734779cd20473cfcaa9d7c8899298
tree4dcbf78c8479cdceb1190af976845f1da140ba74
parent6dadf7cb654ce131c1d05b3add8e30344b6d22be
[lldb/AppleSimulator] Always provide a -simulator environment

Summary:
This commit is somewhat NFC-ish today as the environment of triples
is not considered when comparing s if one of them is
not set (I plan to change that).

We have made simulator triples unambiguous these days, but the
simulator platforms still advertise triples without the
environment. This wasn't an issue when the sims ran only on
a very different architecure than the real device, but this
has changed with Apple Silicon.

This patch simplifies the way GetSupportedArchitectureAtIndex
is implemented for the sim platforms and adds the environment.
It also trivially adds support for Apple Silicon to those
platforms.

Reviewers: aprantl

Subscribers: lldb-commits
lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h
lldb/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h
lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h
lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h
lldb/unittests/Platform/CMakeLists.txt
lldb/unittests/Platform/PlatformAppleSimulatorTest.cpp [new file with mode: 0644]