-enable-eh not default in lli

Hi,

lli --help says:

“-enable-eh - Emit DWARF exception handling (default if target supports)”

But in fact the default on x86-64 linux seems to be disabled, even though exception handling is supported both for lli and when I use the JIT as a library. Is this a bug? I can’t find where llvm::DwarfExceptionHandling is being conditionally set by the JIT based on exception handling support.

– James Williams

Hi James,

lli --help says:

"-enable-eh - Emit DWARF exception handling (default if target supports)"

But in fact the default on x86-64 linux seems to be disabled, even
though exception handling is supported both for lli and when I use the
JIT as a library. Is this a bug? I can't find where
llvm::DwarfExceptionHandling is being conditionally set by the JIT based
on exception handling support.

I'm not sure what you are asking. Are you saying that eh doesn't work with
the JIT on x86-64? Or are you saying that it does work, and wondering why
because this option seems to be off?

Ciao,

Duncan.

Hi James,

lli --help says:

“-enable-eh - Emit DWARF exception handling (default if target supports)”

But in fact the default on x86-64 linux seems to be disabled, even
though exception handling is supported both for lli and when I use the
JIT as a library. Is this a bug? I can’t find where
llvm::DwarfExceptionHandling is being conditionally set by the JIT based
on exception handling support.

I’m not sure what you are asking. Are you saying that eh doesn’t work with
the JIT on x86-64? Or are you saying that it does work, and wondering why
because this option seems to be off?

Hi,

Sorry if I wasn’t very clear. Neither of those things. Exception handling does work and the -enable-eh option does switch it on for x86-64, which is the platform I’m targetting.

My problem is that -enable-eh is not on by default on x86-64 despite ‘lli --help’ suggesting “(default if target supports)” that it should be.

I think this disagreement between what ‘lli --help’ says (-enable-eh default to on for targets that support exception handling) and the actual behaviour (not on by default on x86-64) is a bug.

It’s obviously not a serious problem but it does prevent my compiler using stock lli as I’ve had to patch it to set llvm::DwarfExceptionHandling = true on startup.

– James