Adding options to ClangExpressionParser?

Hi all,

I think there should be an interface for setting user-defined compiler
options for the JIT compiler.

For example, executable is compiled with -fno-rtti, but JIT compiler
doesn't set that by default. This difference will cause search failure
of certain rtti objects, which causes an immediate crash (the crash
code is in LLVM, not in LLDB) ...

What's the preferred way to do this? Here's what I'm thinking:
1. Add an option to source/Target/Target.cpp
2. Make ClangExpressionParser honor that option.

Thanks in advance for any suggestions :slight_smile:

I believe we have an expression options class that can optionally be passed into expression evaluation. We should extend this class to allow for options to be added to that.

Do you mean EvaluateExpressionOptions in Target.h?

It seems that this options class is for runtime purpose; I'd like to
add another class for compiler options only.

That said, I'm perfectly fine with extending this class though :slight_smile:
Which do you suggest?

Thank you!