RFR: 8253757: Add LLVM-based backend for hsdis [v2]
Ludovic Henry
luhenry at openjdk.java.net
Wed Sep 30 21:48:38 UTC 2020
On Wed, 30 Sep 2020 07:26:56 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.
> src/utils/hsdis/hsdis.cpp line 79:
>
>> 77:
>> 78: #ifndef bool
>> 79: #define bool int
>
> if we switch to cpp, do we still need this?
Let me remove these defines.
-------------
PR: https://git.openjdk.java.net/jdk/pull/392
More information about the hotspot-compiler-dev
mailing list