This change allows the swift driver to link the ubsan runtime if
`-sanitize=undefined` is specified.
This is useful for sanitizing linked Objective-C code.
Turns out it's needed for normal builtins that can appear in inlinable
functions, including Objective-C's @available. Clang always links it
unconditionally, so so should Swift.
Note that this does mean you have to build compiler_rt to get a
successful test run on Apple platforms. That was always true if you
wanted the sanitizer tests to work, though.
rdar://problem/41911599
When providing the -parseable-output flag to the swift compiler, it will provide json formatted messages about tasks that run.
I added some optional usage information in form of user time, system time and maxrss to the output. This can be used by other tools using the compiler to get some insights about time and memory usage.
Since the output does not longer match processes run (in batch mode), I also added a real_pid field so the client could reason about jobs that belong together if needed.
rdar://39798231