[lldb-dev] CommandLine Error: Option 'enable-objc-arc-opts' registered more than once!
Azat Khuzhin
a3at.mail at gmail.com
Mon Mar 9 11:43:05 PDT 2015
On Mon, Mar 09, 2015 at 07:23:05PM +0100, Tobias Grosser wrote:
> On 09.03.2015 17:58, Sylvestre Ledru wrote:
> >Hello,
> >
> >I am currently affected by this issue (using trunk)
> >$ lldb-3.7 foo.bar
> >: CommandLine Error: Option 'enable-objc-arc-opts' registered more than
> >once!
> >LLVM ERROR: inconsistency in registered CommandLine options
> >
> >Does it ring a bell?
>
> I have seen this error after linking llvm libraries into Polly and then
> loading polly into clang. Having the same library linked twice yields two
> global constructors, which both try to register this command line string.
> The second registration fails.
I also have such error, and I fix it by hacking the build of the program
that uses llvm, by adding -Wl,--as-needed.
And it could help you too, since in most cases programs that linked with
llvm didn't need all llvm shared libraries.
Of course, the proper fix will be to link lldb only libraries that it
uses from llvm (and in case lldb will use library with that global
options I guess that it will be better to split global options out from
common library into separate one).
Cheers,
Azat.
More information about the lldb-dev
mailing list