wasm-micro-runtime icon indicating copy to clipboard operation
wasm-micro-runtime copied to clipboard

build_llvm.py question

Open nchamzn opened this issue 3 years ago • 1 comments

Hi,

Is there a strong reason for build_llvm.py being written in python? Would you accept a pull request to convert this to a cmake script so it can be more easily integrated with the CMake in wamr-compiler?

Thanks.

nchamzn avatar Sep 16 '22 14:09 nchamzn

WAMR will use it to prepare llvm libraries compilation in CI and help to setup developers' daily environment.

lum1n0us avatar Sep 18 '22 23:09 lum1n0us

I understand the usage, I'm wondering why python is used rather than cmake

nchamzn avatar Sep 26 '22 11:09 nchamzn

  • more convenient and easy to maintain.
  • always thought LLVM libraries are a precondition like GCC and CMAKE. not something should be generated temporarily.

lum1n0us avatar Sep 27 '22 00:09 lum1n0us

As above though:

WAMR will use it to prepare llvm libraries compilation in CI

This suggests it is generated temporarily on CI at least and part of the build system? Or do you bake the LLVM build in to your CI images?

The reason I ask is that I am integrating wamrc with a build system which does not have python available. For now I copy/pasted the build definitions from build_llvm.py to my own cmake but it would be convenient to push a solution upstream so I don't need to maintain this.

nchamzn avatar Sep 27 '22 07:09 nchamzn

Actually, at first, we used to use apt-get install llvm to prepare LLVM libraries. But went to build_llvm.py because of the unstable installation processing. What I am saying is, you don't need to compare LLVM libraries every time when compiling wamrc or iwasm. It is better to think it as a programming tool or some development environment dependency.

You could upload "your own cmake", which I suppose is used to compile LLVM libraries only, to build-scripts.

lum1n0us avatar Sep 30 '22 08:09 lum1n0us

Thank you for the responses, I'll close this.

nchamzn avatar Nov 22 '22 21:11 nchamzn