-
-
Notifications
You must be signed in to change notification settings - Fork 818
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
C++20 module support when using clang toolchain in windows #2954
Comments
What's your clang version? |
15.0.2 I note that the executed command that is automatically generated by xmake is
It contains But I know nothing about lua language. I dont know how to fix it. |
I tried clang-15 on linux, it works for me. please provide your project example. |
windows上不可以,因为windows的路径不能包含 构建命令: xmake f --toolchain=clang -c
xmake build 环境:
样例: 报错: [ 0%]: generating.cxx.module.deps module.ixx
[ 0%]: generating.cxx.module.deps partition.ixx
[ 0%]: generating.cxx.module.deps main.cxx
[ 12%]: generating.cxx.module.bmi xx:partition
error: error: unable to rename temporary 'build\.gens\test\windows\x64\release\rules\modules\cache\xx:partition-6c7c97ca.pcm.tmp' to output file 'build\.gens\test\windows\x64\release\rules\modules\cache\xx:partition.pcm': 'invalid argument'
1 error generated. 详细报错: checking for flags (clang_modules_cache_path) ... ok
> clang "-fmodules-cache-path=C:\Users\puppy\AppData\Local\Temp\.xmake\221023"
checking for flags (clang_module_file) ... ok
> clang "-fmodule-file=C:\Users\puppy\AppData\Local\Temp\.xmake\221023\_EB9B9DAE56BA480088023DF5E5D0FD30.pcm"
[ 12%]: generating.cxx.module.bmi xx:partition
checking for flags (-std=c++20) ... ok
> clang "-std=c++20"
checking for flags (-fmodules) ... ok
> clang "-fmodules"
clang -Qunused-arguments -m64 -std=c++20 -fmodules -fbuiltin-module-map -fimplicit-modules -fno-implicit-module-maps -fmodules-cache-path=build\.gens\test\windows\x64\release\rules\modules\cache -c -x c++-module --precompile partition.ixx -o build\.gens\test\windows\x64\release\rules\modules\cache\xx:partition.pcm
error: unable to rename temporary 'build\.gens\test\windows\x64\release\rules\modules\cache\xx:partition-08e0afb0.pcm.tmp' to output file 'build\.gens\test\windows\x64\release\rules\modules\cache\xx:partition.pcm': 'invalid argument'
1 error generated.
error: @programdir\modules\private\async\runjobs.lua:256: @programdir\core\sandbox\modules\os.lua:372: execv(clang -Qunused-arguments -m64 -std=c++20 -fmodules -fbuiltin-module-map -fimplicit-modules -fno-implicit-module-maps -fmodules-cache-path=build\.gens\test\windows\x64\release\rules\modules\cache -c -x c++-module --precompile partition.ixx -o build\.gens\test\windows\x64\release\rules\modules\cache\xx:partition.pcm) failed(1)
stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:897]:
[@programdir\core\sandbox\modules\os.lua:372]:
[@programdir\core\sandbox\modules\os.lua:285]: in function 'vrunv'
[@programdir\rules\c++\modules\modules_support\clang.lua:383]: in function 'callback'
[@programdir\modules\core\project\depend.lua:193]: in function 'on_changed'
[@programdir\rules\c++\modules\modules_support\clang.lua:372]: in function 'jobfunc'
[@programdir\modules\private\async\runjobs.lua:232]:
stack traceback:
[C]: in function 'error'
@programdir\core\base\os.lua:897: in function 'os.raiselevel'
(...tail calls...)
@programdir\modules\private\async\runjobs.lua:256: in field 'catch'
@programdir\core\sandbox\modules\try.lua:123: in global 'try'
@programdir\modules\private\async\runjobs.lua:218: in upvalue 'cotask'
@programdir\core\base\scheduler.lua:388: in function <@programdir\core\base\scheduler.lua:385> |
我暂时没有 win clang 环境,你可以直接 https://github.com/xmake-io/xmake/blob/master/xmake/modules/core/tools/clang.lua 里面调试下,然后来个 pr |
是个 bug,之前对分区路径其实有处理,只是没处理对, #2970 先试下 xmake update github:xmake-io/xmake#module |
我merge了,直接 dev 试就行了。xmake update -s dev |
多谢, 目前应该没有问题了 |
Xmake Version
2.7.2
Operating System Version and Architecture
windows11
Describe Bug
Environment:
I want use xmake to build a project that consists of c++20 modules. And I use module partition features. The code is as follow.
Then I run
xmake build
, it shows that:Because character ':' is not supported in path string of windows. So
xmake build
failed.Expected Behavior
Successfully build.
Project Configuration
Additional Information and Error Logs
The text was updated successfully, but these errors were encountered: