[llvm] r191042 - Fix LTO handling of module-level assembly (PR14152).
peter at pcc.me.uk
Mon Sep 23 16:30:51 PDT 2013
On Mon, Sep 23, 2013 at 04:06:50PM -0700, Tom Roeder wrote:
> Here is a new version of the patch that removes the all-targets
> dependency from lib/LTO, drops the changes to
> utils/llvm-build/llvmbuild, and updates tools/llvm-lto, tools/lto, and
> tools/gold to take the new initialization/all-targets dependency into
> I removed LTODisassembler.cpp from tools/lto, since its only task
> seemed to be initialization, and I needed that independently, and
> nothing seemed to be using it. At the same time, I added the function
> lto_initialize to tools/lto and llvm-c/lto.h and used it for
> initialization in gold.
> I've tested this on Linux with cmake/ninja and configure/make, and
> I've tested the gold plugin with the simple test case from
> Please take a look.
> - * Initializes LLVM disassemblers.
> - * FIXME: This doesn't really belong here.
> + * Initializes LLVM Targets for lto. This must be called before
> + * creating an lto_code_gen_t or lto_module_t.
> extern void
I don't think this is right. libLTO is a stable external interface used
by Apple's linker. Can you make the lto_codegen_create and lto_module_create*
functions do the target initialization if needed?
More information about the llvm-commits