Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
473 views
in Technique[技术] by (71.8m points)

mongodb 4.2.6 编译后生成的可执行文件为什么这么大

编译后生成的文件

-rwxr-xr-x. 1 root root  766M 8月   3 16:37 mongo
-rwxr-xr-x. 1 root root  1.9G 8月   3 16:44 mongod
-rwxr-xr-x. 1 root root 1002M 8月   3 16:44 mongos
-rwxr-xr-x. 1 root root  7.6K 8月   3 16:52 install_compass

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

自答
使用strip后,恢复正常大小

-rwxr-xr-x. 1 root root 7.6K 8月   3 16:52 install_compass
-rwxr-xr-x. 1 root root  38M 8月   3 17:00 mongo
-rwxr-xr-x. 1 root root  57M 8月   3 17:00 mongod
-rwxr-xr-x. 1 root root  32M 8月   3 17:00 mongos

编译的时候是不是也可以通过指定参数,生成后就不用执行strip


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...