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

compile_commands生成中,编译器路径不应断开 #3217

Closed
DvdBr3o opened this issue Dec 27, 2022 · 3 comments
Closed

compile_commands生成中,编译器路径不应断开 #3217

DvdBr3o opened this issue Dec 27, 2022 · 3 comments
Labels

Comments

@DvdBr3o
Copy link

DvdBr3o commented Dec 27, 2022

Xmake 版本

2.7.4

操作系统版本和架构

Windows

描述问题

在 compile_commands 中,如果编译器路径被断开时,vscode的clangd会无法正常工作。
我记得 xmake 在以往版本的 compile_commands 生成中,编译器路径是不会被断开的,所以那个时候我vscode的clangd也工作正常。

复现项目框架:
{HL}KG%VAKL5OH2UB4X09KO

现版本 xmake 生成的 compile_commands:
357 8PHJ4W$%W3 QDY032CK

手动修改后 (以往版本的 xmake 生成):
BLWEI3CZ1_B)RX$~N`(SF%R

期待的结果

BLWEI3CZ1_B)RX$~N`(SF%R

工程配置

{HL}KG%VAKL5OH2UB4X09KO

附加信息和错误日志

 # xmake project -k compile_commands -vD
checking for cl.exe ... D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64\cl.exe
checking for Microsoft Visual Studio (x64) version ... 2022
checkinfo: cannot runv(dmd.exe --version), No such file or directory
checking for dmd ... no
checkinfo: cannot runv(ldc2.exe --version), No such file or directory
checking for ldc2 ... no
checkinfo: cannot runv(gdc.exe --version), No such file or directory
checking for gdc ... no
checking for zig ... ok
checkinfo: BusyBox v1.36.0-FRP-4784-g5507c8744 (2022-11-09 08:26:33 GMT)

Usage: unzip [-lnojpq] FILE[.zip] [FILE]... [-x FILE]... [-d DIR]

Extract FILEs from ZIP archive

        -l      List contents (with -q for short form)
        -n      Never overwrite files (default: ask)
        -o      Overwrite
        -j      Do not restore paths
        -p      Write to stdout
        -t      Test
        -q      Quiet
        -x FILE Exclude FILEs
        -d DIR  Extract into DIR

checking for unzip ... no
checking for 7z ... D:\Applications\apps\xmake\current\winenv\bin\7z
checking for git ... ok
checkinfo: BusyBox v1.36.0-FRP-4784-g5507c8744 (2022-11-09 08:26:33 GMT)

Usage: gzip [-cfkdt123456789] [FILE]...

Compress FILEs (or stdin)

        -1..9   Compression level
        -d      Decompress
        -c      Write to stdout
        -f      Force
        -k      Keep input files
        -t      Test integrity
D:\Applications\apps\busybox\current\busybox.exe: unknown option -- version

checking for gzip ... no
git rev-parse HEAD
finding quickjs from xmake ..
checking for xmake::quickjs ... quickjs 2021.03.27
checking for link.exe ... D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64\link.exe
checking for the linker (ld) ... link.exe
configure
{
    kind = static
    vs = 2022
    proxy_mac = github.com
    plat = windows
    ndk_stdcxx = true
    ccache = true
    proxy = http://127.0.0.1:10809
    mode = release
    mingw = D:/Program Files/MinGW
    menu = true
    host = windows
    proxy_pac = pac.lua
    arch = x64
    network = public
    pkg_searchdirs = D:\Applications\xmake\pkg
    buildir = build
}
checking for cl.exe ... D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64\cl.exe
checking for the c++ compiler (cxx) ... cl.exe
checking for D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64\cl.exe ... ok
checking for flags (-std:c++20) ... ok
> cl.exe "-std:c++20"
checking for flags (cl_external_includedir) ... ok
> cl.exe "-external:W0" "-external:ID:\Applications\xmake\.packages\q\quickjs\2021.03.27\f1b22ee58676472fbbdd27d79b0a95b0\include"
create ok!
@DvdBr3o DvdBr3o added the bug label Dec 27, 2022
@waruqi
Copy link
Member

waruqi commented Dec 27, 2022

这个最近已经修了,#3203

先更新到 dev ,xmake update -s dev

近期会发新版更新

@DvdBr3o
Copy link
Author

DvdBr3o commented Dec 27, 2022

好的,现在可以了👌 谢谢

@Curve
Copy link

Curve commented Jan 12, 2023

Off Topic Question, but @DvdBr3o may I ask what VSCode Theme you're using?

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

3 participants