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

Mehdi AMINI via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 15 14:50:30 PST 2016


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 wrote:
> > Why aren't these tests returning true when LTO is enabled?
> > I'm not sure why this is not the part that should be fixed instead.
> These flags controls if there should be bitcode embedded in the object file. For the case of LTO, there is no object file thus there is no embedding.
> If change the meaning of this flag, it will complicate the logic around line 6355 and 4169. The other option is to add another flag but it seems little too much for passing one flag to ld.
>From the driver point of view, having a method `embedBitcodeEnabled()` returning false when ... it is actually enabled does not make sense to me.

At minima it should be renamed.


https://reviews.llvm.org/D26690





More information about the cfe-commits mailing list