Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

点击状态栏build,会触发大量重新编译(可能与msvc的runtime有关) #231

Open
Wzshun opened this issue Oct 19, 2023 · 2 comments
Labels

Comments

@Wzshun
Copy link

Wzshun commented Oct 19, 2023

Xmake 版本

2.8.3

操作系统版本和架构

windows10

描述问题

对应的源文件没改动,相关的编译flags也没改动。。但就会发现大量源文件重新编译。

可能的复现方法:
环境:

  1. 使用msvc编译平台
  2. 项目有使用库(内建库)
  3. 新打开vscode,进行项目编译(或者切换下mode?)

使用--policies = "diagnosis.check_build_deps"查看改动。

如图所示,项目中未指定runtimes,按照xmake文档说明,默认都是走MT,但这里不知道为何出现了个MD的比较?
image

还有个类似的情况,切换成debug,出现MDd的比较?没保留截图。。

暂时较忙,未能提供复现demo,见谅。

期待的结果

尽可能少的重新编译。。太耗时了。。

工程配置

附加信息和错误日志

@Wzshun Wzshun added the bug label Oct 19, 2023
@waruqi
Copy link
Member

waruqi commented Oct 20, 2023

加 -vD 看下 logs

然后 看下 xmake show -t target 看下 target 的配置

@Wzshun
Copy link
Author

Wzshun commented Oct 20, 2023

目前正在赶功能就不触发重编了。。-vD 晚些时候,我再写个复现demo吧。。

这是我目前的xmake show -t App 的信息,target比较多,也不清楚你想看那个target。

The information of target(App):
    at: E:\DevelopSpaces\Projects\QT5.6\vCanvasSln\vCanvas\src\App\xmake.lua
    kind: binary
    targetfile: build\windows\x64\debug\vCanvas.exe
    deps:
      -> UI -> .\src\App\xmake.lua:10
    rules:
      -> mode.release -> .\xmake.lua:10
      -> mode.debug -> .\xmake.lua:10
      -> qt.widgetapp -> .\src\App\xmake.lua:8
    links:
      -> CAD -> dep(vCanvas) -> packages
      -> CADViewer -> dep(vCanvas) -> packages
    ldflags:
      -> /subsystem:console -> .\src\App\xmake.lua:36
    frameworks:
      -> QtGui -> .\xmake.lua:39
      -> QtSvg -> dep(UI)
      -> QtWidgets -> dep(vCanvas)
    cflags:
      -> cl::/utf-8 -> .\xmake.lua:18
    cxxflags:
      -> cl::/utf-8 -> .\xmake.lua:19
      -> cl::/wd4819 -> .\xmake.lua:21
    linkdirs:
      -> E:\DevelopSpaces\Projects\IFA_Projects\vCanvasCoreSln\build\packages\c\cad\windows\x64\debug\lib -> dep(vCanvas) -> packages
      -> E:\DevelopSpaces\Projects\IFA_Projects\vCanvasCoreSln\build\packages\c\cad\windows\x64\release\lib -> dep(vCanvas) -> packages
      -> E:\DevelopSpaces\Projects\IFA_Projects\vCanvasCoreSln\build\packages\c\cadviewer\windows\x64\debug\lib -> dep(vCanvas) -> packages
    includedirs:
      -> build -> .\src\App\xmake.lua:18
      -> src\UI -> dep(UI)
      -> src\Libs\GCode -> dep(GCode)
      -> src\Libs\CAM -> dep(CAM)
      -> src\Libs\vCanvas -> dep(vCanvas)
    sysincludedirs:
      -> E:\DevelopSpaces\Projects\IFA_Projects\vCanvasCoreSln\build\packages\c\cad\windows\x64\debug\include -> dep(vCanvas) -> packages
      -> E:\DevelopSpaces\Projects\IFA_Projects\vCanvasCoreSln\build\packages\c\cadviewer\windows\x64\debug\include -> dep(vCanvas) -> packages
      -> E:\DevelopSpaces\Projects\IFA_Projects\vCanvasCoreSln\build\packages\c\cad\windows\x64\release\include -> dep(vCanvas) -> packages
    files:
      -> src\App\*.cpp -> .\src\App\xmake.lua:9
      -> src\App\app.rc -> .\src\App\xmake.lua:32
    compiler (mrc): C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64\rc.exe
      -> -nologo
    compiler (cxx): C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64\rc.exe
      -> -nologo
    linker (ld): I:\DevelopmentTools\VS2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\link.exe
      -> -nologo -dynamicbase -nxcompat -machine:x64
    compflags (mrc):
      -> -nologo -Ibuild -Isrc\UI -Isrc\Libs\vCanvas -Isrc\Libs\CAM -Isrc\Libs\GCode -IE:\DevelopSpaces\Projects\IFA_Projects\vCanvasCoreSln\build\packages\c\cad\windows\x64\debug\include -IE:\DevelopSpaces\Projects\IFA_Projects\vCanvasCoreSln\build\packages\c\cadviewer\windows\x64\debug\include -IE:\DevelopSpaces\Projects\IFA_Projects\vCanvasCoreSln\build\packages\c\cad\windows\x64\release\include
    compflags (cxx):
      -> -nologo -Ibuild -Isrc\UI -Isrc\Libs\vCanvas -Isrc\Libs\CAM -Isrc\Libs\GCode -IE:\DevelopSpaces\Projects\IFA_Projects\vCanvasCoreSln\build\packages\c\cad\windows\x64\debug\include -IE:\DevelopSpaces\Projects\IFA_Projects\vCanvasCoreSln\build\packages\c\cadviewer\windows\x64\debug\include -IE:\DevelopSpaces\Projects\IFA_Projects\vCanvasCoreSln\build\packages\c\cad\windows\x64\release\include
    linkflags (ld):
      -> -nologo -dynamicbase -nxcompat -machine:x64 -libpath:E:\DevelopSpaces\Projects\IFA_Projects\vCanvasCoreSln\build\packages\c\cad\windows\x64\debug\lib -libpath:E:\DevelopSpaces\Projects\IFA_Projects\vCanvasCoreSln\build\packages\c\cadviewer\windows\x64\debug\lib -libpath:E:\DevelopSpaces\Projects\IFA_Projects\vCanvasCoreSln\build\packages\c\cad\windows\x64\release\lib CADViewer.lib CAD.lib /subsystem:console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants