xmake-io / xmake

🔥 A cross-platform build utility based on Lua
https://xmake.io
Apache License 2.0
10.19k stars 788 forks source link

增量编译问题 #5861

Closed wagcheg closed 4 days ago

wagcheg commented 4 days ago

Xmake 版本

v2.9.2

操作系统版本和架构

Windows 11

描述问题

1.obj文件的依赖没有pch文件 为了实现sharedpch以及问题3 2.动态库只删除dll或者lib后不能生成dll 2.1由于中断链接生成的2M大小的dll 运行不起来 手动删除该dll 重新编译不会链接新的 2.2排查链接问题 删除lib不触发链接 3.rules生成的cpp没有depfile和pch依赖支持 删除间接引用的dllexport的头文件的函数导致使用moc的target链接不过 目前通过修改rules在load阶段将moc.cpp添加到files解决

期待的结果

能够增量构建

工程配置

项目为300+target大工程 rebuild耗时太长 目前正在实现sharedpch加速编译

附加信息和错误日志

Issues-translate-bot commented 4 days ago

Bot detected the issue body's language is not English, translate it automatically.


Title: incremental compilation problem

Xmake version

v2.9.2

Operating system version and architecture

Windows 11

Describe the problem

  1. The dependency of the obj file does not have the pch file. In order to implement sharedpch and question 3
  2. The dynamic library cannot generate dll after only deleting dll or lib. 2.1 The 2M-sized dll generated due to interrupted linking cannot run. Manually delete the dll and recompile without linking the new one. 2.2 Troubleshoot linking problems. Deleting lib does not trigger linking.
  3. The cpp generated by rules does not have depfile and pch dependency support. The function of deleting the indirectly referenced dllexport header file causes the target link of moc to be used. This is currently solved by modifying the rules and adding moc.cpp to files in the load phase.

Expected results

Ability to build incrementally

Project configuration

The project is a large project with 300+ targets. The rebuild takes too long. Sharedpch accelerated compilation is currently being implemented

Additional information and error logs

No

waruqi commented 4 days ago

看不懂你在说啥,多个问题不要混一起,一个问题一个 issues,并详细说明。

Issues-translate-bot commented 4 days ago

Bot detected the issue body's language is not English, translate it automatically.


I don’t understand what you are talking about. Don’t mix multiple issues together. Please address each issue one at a time and explain it in detail.