Page MenuHomePhabricator

[clang][IFS][test] GreenDragon and Fuchsia Darwin bot fix: BindArchClass Nest.
Needs ReviewPublic

Authored by plotfi on Nov 20 2019, 11:06 PM.



This is a post commit review. If I can re-implement this in a nicer way I will do an NFC commit.

On Darwin the clang driver does not invoke Driver::BuildActions directly
due to the need to handle Universal apps. Because of this there is a
difference in code path where Driver::BuildUniversalActions is called
instead of Driver::BuildActions. BuildUniversalActions ends up calling
Driver::BuildAction but what it does differently is it takes the driver
actions returned and wraps them each into a BindArchAction.

In Driver::BuildJobs there is a check for '-o' to determine that
multiple files are not specified when passing -o, except for Clang
Interface Stub this need to be an exception as we actually want to write
out multiple files: for every we have a libfoo.ifso sidecar
ifso file, etc. To allow this to happen there is a check for
IfsMergeAction, which is permitted to write out a secondary file. Except
on Darwin, the IfsMergeAction gets wrapped in the BindArchAction by
Driver::BuildUniversalActions so the check fails.

This patch is to look inside a BindArchAction in Driver::BuildJobs to
determine if there is in fact an IfsMergeAction, and if-so (pun intended)
allow the secondary sidecard ifs/ifso file to be written out.

Diff Detail

Event Timeline

plotfi created this revision.Nov 20 2019, 11:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 20 2019, 11:06 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript