Based on LLVM official page, it is possible to have install-time optimization, based on my understanding, which first compiles to bytecode on build machine before distribution, and then on target machines, converts the bytecode to native code when installing.
Is there any real world example on this feature? More specifically, I am wondering if it is possible to take an arbitrary open source C/C++ project which uses autoconf (i.e. typically built and installed by ./configure && make && make install
), and
- on build machine, by running
./configure && make
in a special way (e.g. setting some environment variables, or even modify the configure.ac or some other autoconf files) so that it generates executable and libraries as byte code; - I transfer the build tree to target machine, and run
make install
in a special way so that it installs all files as usual, but converts byte code to native code for executable and libraries.