jgorbe added inline comments.
================ Comment at: lib/Driver/Driver.cpp:2600-2603 + // When saving temps, add extra actions to write unoptimized and optimized + // IR besides the normal bitcode outputs if possible. This is not possible + // for multi-arch builds because in these builds we check that we can lipo + // all action outputs. ---------------- tra wrote: > I'm not sure I understand why unoptimized IR can't be written out for > multi-arch builds like CUDA. Could you elaborate? The error I was trying to work around here is [[ https://reviews.llvm.org/diffusion/L/browse/cfe/trunk/lib/Driver/Driver.cpp;304376$1407 | this one ]]. It's not really specific to all multi-arch builds, but to Mach-O multi-arch builds. For those, BuildUniversalActions is called, which checks that all actions produce outputs with lipo-able types (see also the types::canLipoType() function) or errors out otherwise. [[ http://lists.llvm.org/pipermail/cfe-dev/2017-May/053811.html | I'm not sure the check is still necessary ]], but I got no answers when I asked about it in cfe-dev, so I decided to just not do it for that kind of builds. I have updated the patch to make it clear that we only skip generating these IR files in that particular case, not every multi-arch build. Thanks for pointing this out! https://reviews.llvm.org/D33108 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits