This substitution expands to the clang flag that sets the minimum
deployment target OS version to the version of the OS that the
testing target uses.
This requires querying the test target at testing time
for the OS version of the target. We assume that
%run sw_vers -productVersion can obtain this.
For the iOS simulator the sw_vers command does not exist
so we emulate a subset of the command's capabilities by
probing the environment of the simulator.
The motivation here is that bbde056b88 made all sanitizer tests
run with the lowest deployment target possible. This means we
no longer test newer deployment targets. This patch will make it
possible to write lit tests that target newer deployment targets.
rdar://problem/57127911