[Driver] Infer the correct option to ld64 for -fembed-bitcode
authorSteven Wu <stevenwu@apple.com>
Wed, 16 Nov 2016 06:06:44 +0000 (06:06 +0000)
committerSteven Wu <stevenwu@apple.com>
Wed, 16 Nov 2016 06:06:44 +0000 (06:06 +0000)
commit844ab6a0126a6379712e1db5c3c3a93653022f99
tree9b5edc092751ecc24b6fd605ccf3c0d2c35686fb
parent6910fa0ef4218ab1ec7c36a2b44b48f9ba7193a6
[Driver] Infer the correct option to ld64 for -fembed-bitcode

Summary:
-fembed-bitcode infers -bitcode_bundle to ld64 but it is not correctly
passed when using LTO. LTO is a special case of -fembed-bitcode which
it doesn't require embed the bitcode in a special section in the object
file but it requires linker to save that as part of the final executable.

rdar://problem/29274226

Reviewers: mehdi_amini

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D26690

llvm-svn: 287084
clang/include/clang/Driver/Driver.h
clang/lib/Driver/Driver.cpp
clang/lib/Driver/Tools.cpp
clang/test/Driver/embed-bitcode.c