[PATCH] D26690: [Driver] Infer the correct option to ld64 for -fembed-bitcode

2016-11-15 Thread Steven Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL287084: [Driver] Infer the correct option to ld64 for -fembed-bitcode (authored by steven_wu). Changed prior to commit: https://reviews.llvm.org/D26690?vs=78111&id=78140#toc Repository: rL LLVM http

[PATCH] D26690: [Driver] Infer the correct option to ld64 for -fembed-bitcode

2016-11-15 Thread Mehdi AMINI via cfe-commits
mehdi_amini accepted this revision. mehdi_amini added a comment. This revision is now accepted and ready to land. LGTM! I feel the code is cleaner like that at uses of these API :) https://reviews.llvm.org/D26690 ___ cfe-commits mailing list cfe-co

[PATCH] D26690: [Driver] Infer the correct option to ld64 for -fembed-bitcode

2016-11-15 Thread Steven Wu via cfe-commits
steven_wu updated this revision to Diff 78111. steven_wu added a comment. Rename the functions to clarify the intention. embedBitcodeEnabled means if any flag in -fembed-bitcode family is used so the corresponding linker flag should be inferred. embedBitcodeInObject means if the bitcode should be

[PATCH] D26690: [Driver] Infer the correct option to ld64 for -fembed-bitcode

2016-11-15 Thread Mehdi AMINI via cfe-commits
mehdi_amini added inline comments. Comment at: lib/Driver/Tools.cpp:8326 - if (C.getDriver().embedBitcodeEnabled() || - C.getDriver().embedBitcodeMarkerOnly()) { -// Check if the toolchain supports bitcode build flow. steven_wu wrote: > mehdi_amini wrot

[PATCH] D26690: [Driver] Infer the correct option to ld64 for -fembed-bitcode

2016-11-15 Thread Steven Wu via cfe-commits
steven_wu added inline comments. Comment at: lib/Driver/Tools.cpp:8326 - if (C.getDriver().embedBitcodeEnabled() || - C.getDriver().embedBitcodeMarkerOnly()) { -// Check if the toolchain supports bitcode build flow. mehdi_amini wrote: > Why aren't these

[PATCH] D26690: [Driver] Infer the correct option to ld64 for -fembed-bitcode

2016-11-15 Thread Mehdi AMINI via cfe-commits
mehdi_amini added inline comments. Comment at: lib/Driver/Tools.cpp:8326 - if (C.getDriver().embedBitcodeEnabled() || - C.getDriver().embedBitcodeMarkerOnly()) { -// Check if the toolchain supports bitcode build flow. Why aren't these tests returning tr

[PATCH] D26690: [Driver] Infer the correct option to ld64 for -fembed-bitcode

2016-11-15 Thread Steven Wu via cfe-commits
steven_wu created this revision. steven_wu added a reviewer: mehdi_amini. steven_wu added a subscriber: cfe-commits. -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