Skip to content

llvm-ld -native fails with .a archive produced by llvm-ar #11365

@llvmbot

Description

@llvmbot
Bugzilla Link 10993
Resolution WONTFIX
Resolved on Oct 19, 2012 08:36
Version 2.9
OS MacOS X
Attachments test case; a directory with 3 C++ files and a makefile.
Reporter LLVM Bugzilla Contributor

Extended Description

I've attached a small example with makefile that reproduces the problem. I'm doing this on 10.7 with the latest XCode installed, and llvm-2.9 installed in /usr/local.

Two C++ files are compiled with clang++ -O4, a lib.a archive created of them using llvm-ar, and llvm-ld used to link them. I'm hoping to get LTO from this model of compilation archiving and linking, and perhaps to specialize llvm-ld for some particular linking work. Unfortunately when -native is given to llvm-ld it seems to misread the archive file (?)

llvm-ld without -native completes without reporting an error, although I haven't tried executing the result (I need native code).

the example works fine if I use libtool for the archiving and clang++ for the final link step. I've included commented-out lines in the Makefile to test this case.

Best regards,

-Luddy

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillallvm-toolsAll llvm tools that do not have corresponding tagwontfixIssue is real, but we can't or won't fix it. Not invalid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions