Created
July 22, 2022 13:53
-
-
Save 2439905184/9c5d490dc04e272458e401cef546200a to your computer and use it in GitHub Desktop.
关于在windows使用msys2 + mingw + gcc 编译godot的笔记
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
关于在windows使用msys2 + mingw + gcc/g++ 编译godot的笔记 | |
编译参数 | |
1. target=release_debug ,release,debug | |
2. 多线程参数-j数字 | |
3. profile是自定义构建参数(可以启用或者禁用一些不用的模块) | |
4. 如果你用MinGW编译Godot, 你可以通过添加SCons选项 use_lto=yes 来使二进制文件更小更快. 由于链接时优化是一个内存密集的过程, 在编译时需要大约7GB的可用内存. | |
记录踩坑记录使用msys2+mingw编译,如果使用了use_lto选项,可能会导致链接失败,所以可以不用这个参数 | |
1.编译编辑器 | |
scons profile=custom.py -j4 target=release use_mingw=yes tools=yes | |
2.编译导出模板 | |
scons profile=custom.py -j4 target=release use_mingw=yes tools=no | |
scons profile=custom.py -j4 target=debug use_mingw=yes tools=no | |
2.执行strip 剥离调试符号(优化体积大小) | |
strip godot_xxx.exe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment