junjiechen0/njust/cjc
Claude Code and agent skill by junjiechen0/njust
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install junjiechen0/njust/cjcSKILL.md
The same SKILL.md was published earlier as junjiechen0/njust/cjc.
仓颉编译器 cjc 核心用法
1. 基本用法
cjc-frontend:仅前端编译器,输出 LLVM IR(.bc)cjc:自动完成 前端 + 后端 + 链接
2. 核心选项速查
2.1 输出控制
| 选项 | 说明 | |||
|---|---|---|---|---|
-o <file> | 指定输出文件路径 | |||
| `--output-type=[exe\ | staticlib\ | dylib]` | 输出类型(默认 exe) | |
--output-dir <dir> | 中间文件与输出保存目录 |
2.2 包与模块
| 选项 | 说明 | |
|---|---|---|
-p, --package | 编译整个包目录 | |
--module-name <name> | 指定模块名 | |
--import-path <dir> | 添加 .cjo 文件搜索路径(同 CANGJIE_PATH) |
2.3 链接
| 选项 | 说明 | |
|---|---|---|
-L <dir> | 库文件搜索目录 | |
-l <name> | 链接库(搜索 lib<name>.a/.so) | |
--static | 静态链接仓颉库(仅 Linux) | |
--static-std / --dy-std | 静态/动态链接 std 模块 | |
--static-libs / --dy-libs | 静态/动态链接非 std 模块 |
注意:--dy-std与--static-libs不可同时使用;--static-std与--dy-libs不可同时使用。
2.4 调试与诊断
| 选项 | 说明 | |||
|---|---|---|---|---|
-g | 生成调试信息(须配合 -O0) | |||
-V, --verbose | 打印编译过程详细信息 | |||
-v, --version | 打印编译器版本 | |||
-h, --help | 打印帮助信息 | |||
| `--diagnostic-format=[default\ | noColor\ | json]` | 错误信息输出格式 | |
| `--error-count-limit <N\ | all>` | 限制打印错误数量(默认 8) |
2.5 测试
2.6 宏
2.7 条件编译
2.8 优化
| 选项 | 说明 | |||
|---|---|---|---|---|
-O0 / -O1 / -O2 / -Os / -Oz | 优化级别 | |||
| `--lto=[full\ | thin]` | 链接时优化(仅 Linux) | ||
-j <N>, --jobs <N> | 并行编译最大线程数 | |||
| `--int-overflow=[throwing\ | wrapping\ | saturating]` | 整数溢出策略(默认 throwing) |
2.9 覆盖率与性能分析
2.10 交叉编译
2.11 其他常用选项
| 选项 | 说明 | |||
|---|---|---|---|---|
--trimpath <prefix> | 移除调试信息中的路径前缀 | |||
-s, --strip-all | 删除输出文件中的符号表 | |||
--set-runtime-rpath | 写入运行时库路径到 RPATH | |||
--disable-reflection | 关闭反射信息生成 | |||
--no-sub-pkg | 声明无子包以缩减 code size | |||
| `--stack-trace-format=[default\ | simple\ | all]` | 异常调用栈格式 |
3. 典型工作流
提示:多文件项目推荐使用cjpm(参见cangjie-project-managementSkill),无需手动管理编译依赖。
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.njust-ai/skills/cangjie-toolchains/cjc/SKILL.md
Popularity
- Repository stars
- 4
- Repository forks
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/junjiechen0/njust/cjc)