You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PS C:\Users\Guyutongxue\Downloads\temp\xmake-bug-repro> xmake -vDchecking for platform ... windowschecking for architecture ... x64checking for vswhere.exe ... C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exechecking for cl.exe ... C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.30.30705\bin\HostX64\x64\cl.exechecking for Microsoft Visual Studio (x64) version ... 2022checkinfo: cannot runv(dmd.exe --version), No such file or directorychecking for dmd ... nocheckinfo: cannot runv(ldc2.exe --version), No such file or directorychecking for ldc2 ... nocheckinfo: cannot runv(gdc.exe --version), No such file or directorychecking for gdc ... nocheckinfo: cannot runv(zig.exe version), No such file or directorychecking for zig ... nocheckinfo: cannot runv(zig.exe version), No such file or directorychecking for zig ... nochecking for link.exe ... C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.30.30705\bin\HostX64\x64\link.exechecking for the linker (ld) ... link.exechecking for cl.exe ... C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.30.30705\bin\HostX64\x64\cl.exechecking for the c++ compiler (cxx) ... cl.execheckinfo: cannot runv(ccache.exe --version), No such file or directorychecking for ccache ... no[ 25%]: compiling.release main.cpp"C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.30.30705\\bin\\HostX64\\x64\\cl.exe" -c /EHsc -nologo -Fobuild\.objs\xmake-bug-repro\windows\x64\release\main.cpp.obj main.cppchecking for C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.30.30705\bin\HostX64\x64\cl.exe ... okchecking for flags (cl_sourceDependencies) ... ok
> cl.exe "/sourceDependencies""C:\Users\Guyutongxue\AppData\Local\Temp\.xmake\220124\_76B06D1EC1614E008E5AF95D5EAA9730.json""/EHsc"[ 50%]: linking.release xmake-bug-repro.exe"C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.30.30705\\bin\\HostX64\\x64\\link.exe" -nologo -dynamicbase -nxcompat -machine:x64 /ManifestFile:app.manifest /manifest -out:build\windows\x64\release\xmake-bug-repro.exe build\.objs\xmake-bug-repro\windows\x64\release\main.cpp.obj[100%]: build ok!
相关环境
xmake版本:v2.6.3+master.e2bbeb1b0
xmake运行平台:Windows 11 21H2 (22000.434)
xmake目标平台:Windows
其他信息
上述错误极小复现代码:
app.manifest
此文件在编译后会错误地被覆盖。
<!-- App Manifest file is required by IsWindows10OrGreater API -->
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assemblyxmlns="urn:schemas-microsoft-com:asm.v1"manifestVersion="1.0">
<compatibilityxmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 10 -->
<supportedOSId="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
</application>
</compatibility>
</assembly>
main.cpp
若 Manifest 文件成功嵌入,则在 Windows 10 或更高版本下运行应打印 1。嵌入失败时,打印 0。
描述问题
向
add_files
提供.manifest
文件时,应当将该清单作为输入并嵌入可执行文件。而目前 xmake 的实现是错误的:它将 MSVC 链接器的清单文件输出覆盖到对应路径。期待的结果
当
add_files("app.manifest")
时,应当向链接器提供如下参数:/MANIFEST:EMBED
以及/MANIFESTINPUT:${filepath}
。(但目前 xmake 的做法是提供
/MANIFEST
与/MANIFESTFILE
参数,这或许是不正确的:参考结尾附微软文档。)错误信息
xmake -vD
相关环境
v2.6.3+master.e2bbeb1b0
其他信息
上述错误极小复现代码:
app.manifest
此文件在编译后会错误地被覆盖。
main.cpp
若 Manifest 文件成功嵌入,则在 Windows 10 或更高版本下运行应打印 1。嵌入失败时,打印 0。
xmake.lua
/MANIFEST 与 /MANIFEST:EMBED 文档
/MANIFESTFILE 文档
/MANIFESTINPUT 文档
IsWindows10OrGreater 文档
相关 Issue #1241
The text was updated successfully, but these errors were encountered: