缩减openssl库体积

缩减openssl库体积


前言

去除非必要库缩减体积

环境

strawberry-perl-5.32.1.1-64bit
strawberry-perl
安装完成后都添加到环境变量
Visual Studio 2015
Openssl 1.1.1

过程:

开始 — 所有程序 — Visual Studio 2019 — Visual Studio Tools — 选择一个命令提示工具
在这里插入图片描述
进入命令提示符,然后定位至OpenSSL的安装目录

cd 到openssl目录下,使用命令:

perl Configure VC-WIN32 no-asm no-async no-shared no-md2 no-md4 no-mdc2 no-poly1305 no-blake2 no-siphash no-sm3 no-rc2 no-rc4 no-rc5 no-idea no-aria no-bf no-cast no-camellia no-seed no-sm4 no-chacha no-ec no-dsa no-sm2 no-dso no-engine no-err no-comp no-ocsp no-cms no-ts no-srp no-cmac no-ct --prefix=C:\Users\xx\Desktop\openssl

这是看你自己选择缩减什么库
参数参考:

https://wiki.openssl.org/index.php/Compilation_and_Installation

no-shared为静态库,反之为动态库
VC-WIN32 为32库
VC-WIN64A 为64库
要使用debug版本,请使用debug-VC-WIN64A或debug-VC-WIN32

–prefix为编译完成后的输出路径

nmake编译
nmake test编译
nmake install编译 输出

nmake clean清除编译的openssl

参考文章:
https://developer.aliyun.com/article/717370
https://breezetemple.github.io/2019/04/03/cros-compile-openssl-and-wolfssl/
https://www.jianshu.com/p/f510823735fc

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值