RFR: 8253757: Add LLVM-based backend for hsdis [v2]
Ludovic Henry
luhenry at openjdk.java.net
Thu Oct 1 03:32:21 UTC 2020
On Thu, 1 Oct 2020 01:26:18 GMT, Xin Liu <xliu at openjdk.org> wrote:
>>>To disassemble code, I don't think we have to link so many libraries. It looks like code only explicitly depends
>>>LLVMMCDisassembler and LLVMTarget here.
>>
>> This is the result of `llvm-config --libs x86 x86disassembler` and `llvm-config --libs aarch64 aarch64disassembler`.
>>
>>> If we do need to link those libraries, how about we just use llvm-config --libs. If we declare so many names here, the
>>> Makefile is subject to LLVM. In history, LLVM refactored a lot.
>>
>> That should work in the general case. I did it this way originally because of cases where we need to use a
>> cross-compiled LLVM. Then `llvm-config` and the related libraries would be compiled for the host platform. Then, the
>> user can just specify the `LIBRARIES/*` variable by hand on the command line.
>
> I saw you manged to solve this cross-compilation issue. cool!
> Please note that I am not a reviewer. feel free to ignore what I said if it makes nonsense.
> I just want to chip in some constructive ideas.
That isn't going to work in the case where you've compiled LLVM for a different host than the current one (build !=
host). I'll add a comment to document such a case and what to do then. Thanks for the reminder.
> Please note that I am not a reviewer. feel free to ignore what I said if it makes nonsense.
> I just want to chip in some constructive ideas.
This is more than welcome! Having another pair of eyes is always welcome, especially in the open from someone I don't
have the opportunity to work with on a daily basis.
-------------
PR: https://git.openjdk.java.net/jdk/pull/392
More information about the hotspot-compiler-dev
mailing list