Index: lib/LTO/LTOCodeGenerator.cpp =================================================================== --- lib/LTO/LTOCodeGenerator.cpp +++ lib/LTO/LTOCodeGenerator.cpp @@ -545,8 +545,10 @@ formatted_raw_ostream Out(out); // If the bitcode files contain ARC code and were compiled with optimization, - // the ObjCARCContractPass must be run, so do it unconditionally here. - codeGenPasses.add(createObjCARCContractPass()); + // the ObjCARCContractPass must be run, check the module flag to see if there + // is any file requires ARC + if (mergeModule->getModuleFlag("Objective-C ARC")) + codeGenPasses.add(createObjCARCContractPass()); if (TargetMach->addPassesToEmitFile(codeGenPasses, Out, TargetMachine::CGFT_ObjectFile)) {