Adding an LLVM Optimization Pass while Building openSSL Using Clang

Ange-Thierry Ishimwe Ange-Thierry.Ishimwe at colorado.edu
Tue Apr 2 02:11:19 UTC 2024


Hi all,

I am currently working on building OpenSSL for RISC-V architecture using
clang/llvm. While I've successfully compiled OpenSSL and generated a binary
using the linux64-riscv64 configuration, I would like to integrate an LLVM
optimization pass into the compilation process before the object files are
created.

*Traditionally, the OpenSSL process follows the pattern:*
clang [source file] -o [obj file]


*However, my objective is to introduce an additional step in the process,
as follows:clang    *[source file] -o [LLVM IR File]
*opt        *[LLVM IR File] -o [OPTIMIZED LLVM IR File]
*clang    *[OPTIMIZED LLVM IR File] -o [obj file]

Basically, I want to create intermediate representations (IR), apply a
custom optimization pass on them, and subsequently produce an object file
on all the source files.

Could I please get some guidance or point me in the right direction on how
to achieve this within the OpenSSL build process?

Your assistance would be greatly appreciated.

Best
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20240401/d5508713/attachment.htm>


More information about the openssl-users mailing list