summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
diff options
context:
space:
mode:
authorPuyan Lotfi <puyan@puyan.org>2019-11-20 21:40:04 -0500
committerPuyan Lotfi <puyan@puyan.org>2019-11-20 22:12:28 -0500
commitfec3ca77bbce6917c103963b7b85b60dfb865c7b (patch)
tree82dc328e354e0d021f12aad999b77509fa61a2ec /clang/lib/Driver
parenta84922916e6eddf701b39fbd7fe0222cb0fee1d6 (diff)
downloadbcm5719-llvm-fec3ca77bbce6917c103963b7b85b60dfb865c7b.tar.gz
bcm5719-llvm-fec3ca77bbce6917c103963b7b85b60dfb865c7b.zip
[clang][IFS][test] GreenDragon and Fuchsia Darwin bot fix: BindArchClass Nest.
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 libfoo.so 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.
Diffstat (limited to 'clang/lib/Driver')
-rw-r--r--clang/lib/Driver/Driver.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 83b5db3b253..90f3cea5b2a 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -3698,7 +3698,9 @@ void Driver::BuildJobs(Compilation &C) const {
unsigned NumOutputs = 0;
for (const Action *A : C.getActions())
if (A->getType() != types::TY_Nothing &&
- A->getKind() != Action::IfsMergeJobClass)
+ !(A->getKind() == Action::IfsMergeJobClass ||
+ (A->getKind() == Action::BindArchClass && A->getInputs().size() &&
+ A->getInputs().front()->getKind() == Action::IfsMergeJobClass)))
++NumOutputs;
if (NumOutputs > 1) {
OpenPOWER on IntegriCloud