Sync with justfile

This commit is contained in:
Aoran Zeng
2025-06-20 22:01:25 +08:00
parent 2e0059978c
commit 90cf624f53
2 changed files with 57 additions and 24 deletions

View File

@@ -47,20 +47,22 @@ $ git clone https://gitee.com/RubyMetric/chsrc.git -b dev
### 编译运行
```bash
make # 默认使用 cc 编译
make (b) # 在Windows上默认使用 cc 编译在macOS上默认使用 clang 编译,在其他系统上默认使用 cc 编译
make CC=clang # 使用 clang 编译
make CC=gcc # 使用 gcc 编译
# 编译出 debug 版本: chsrc-debug
just bd
# 编译出 release 版本: chsrc-release
just br
```
```bash
# 重新编译并启动 GDB 调试
# 重新编译出 ./chsrc-debug并启动 GDB 调试 (在macOS上启动 LLDB 调试)
$ make debug
# 重新编译并启动 LLDB 调试
# 重新编译出 ./chsrc-debug并启动 LLDB 调试
$ make debug DEBUGGER=lldb
# 如果需要单独生成含有编译信息的二进制文件这个不会自己启动debugger
$ make DEBUG=1
```
<br>
@@ -100,7 +102,7 @@ just br
# 重新编译出 ./chsrc-debug并启动 GDB 调试 (在macOS上启动 LLDB 调试)
$ just debug
# 使用其他调试器,如 LLDB 调试
# 重新编译出 ./chsrc-debug并启动 LLDB 调试
$ just DEBUGGER=lldb debug
```