-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
import C++20 module but clang-scan-deps doen't known the "-s USE_WEBGPU=1" options. #21866
Comments
Does cmake always assume it can pass all cflags to If so I guess we need an In any case I don't think passing |
Sorry for bad English skill... I am trying to use C++20 module in my project. I thought emsdk/upstream/bin/clang-scan-deps had already addressed this issue, so I reported it. Since the code itself relies on <webgpu/webgpu.h> from emscripten, I think it's still necessary to include "-s USE_WEBGPU=1" for clang-scan-deps, but I am not sure. |
The problem is that I guess we need to add some kind of |
USE_WEBGPU is only a link flag. Did you set it explicitly as a compile flag? |
For some reason [build] "/mnt/e/Workspace/Diyou.Engine/.cache/emsdk/upstream/bin/clang-scan-deps" -format=p1689 -- /mnt/e/Workspace/Diyou.Engine/.cache/emsdk/upstream/emscripten/em++ -I/mnt/e/Workspace/Diyou.Engine/build/Debug.WASM/.cache/SDL3/include -I/mnt/e/Workspace/Diyou.Engine/.cache/SDL3/include -I/mnt/e/Workspace/Diyou.Engine/.cache/SDL3/include/SDL3 -g -std=c++23 -flto=thin -fPIC -idirafter/mnt/e/Workspace/Diyou.Engine/.cache/SDL3/src/video/khronos -Winvalid-pch -Xclang -include-pch -Xclang /mnt/e/Workspace/Diyou.Engine/build/Debug.WASM/CMakeFiles/Diyou.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /mnt/e/Workspace/Diyou.Engine/build/Debug.WASM/CMakeFiles/Diyou.dir/cmake_pch.hxx -x c++ /mnt/e/Workspace/Diyou.Engine/Source/Runtime.c++ -c -o CMakeFiles/Diyou.dir/Source/Runtime.c++.o -MT CMakeFiles/Diyou.dir/Source/Runtime.c++.o.ddi -MD -MF CMakeFiles/Diyou.dir/Source/Runtime.c++.o.ddi.d > CMakeFiles/Diyou.dir/Source/Runtime.c++.o.ddi.tmp && mv CMakeFiles/Diyou.dir/Source/Runtime.c++.o.ddi.tmp CMakeFiles/Diyou.dir/Source/Runtime.c++.o.ddi
[build] Error while scanning dependencies for /mnt/e/Workspace/Diyou.Engine/Source/Runtime.c++:
[build] error: ignore exceptions was enabled in PCH file but is currently disabled
[build] error: PCH file was compiled for the target 'wasm32-unknown-emscripten' but the current translation unit is being compiled for target 'x86_64-unknown-linux-gnu' |
I don't think its going to be easy to make |
EMSDK version:
Compile command:
Output / Error message:
CMakeFiles/trd-party-lib-dear-imgui.dir/cpp/3rdParty/imgui-1.90.4-docking/imgui_tables.cpp.o.ddi "/root/emsdk/upstream/bin/clang-scan-deps" -format=p1689 -- /root/emsdk/upstream/emscripten/em++ -DIMGUI_DEFINE_MATH_OPERATORS -I/home/ubuntu/git/cpp/3rdParty/imgui-1.90.4-docking -I/home/ubuntu/git/cpp/3rdParty/imgui-1.90.4-docking/backends -I/home/ubuntu/git/cpp/3rdParty/imgui-1.90.4-docking/backends/libs -I/home/ubuntu/git/cpp/3rdParty/imgui-1.90.4-docking/examples/libs -O2 -g -DNDEBUG -std=c++23 -s USE_WEBGPU=1 -x c++ /home/ubuntu/git/cpp/3rdParty/imgui-1.90.4-docking/imgui_tables.cpp -c -o CMakeFiles/trd-party-lib-dear-imgui.dir/cpp/3rdParty/imgui-1.90.4-docking/imgui_tables.cpp.o -MT CMakeFiles/trd-party-lib-dear-imgui.dir/cpp/3rdParty/imgui-1.90.4-docking/imgui_tables.cpp.o.ddi -MD -MF CMakeFiles/trd-party-lib-dear-imgui.dir/cpp/3rdParty/imgui-1.90.4-docking/imgui_tables.cpp.o.ddi.d > CMakeFiles/trd-party-lib-dear-imgui.dir/cpp/3rdParty/imgui-1.90.4-docking/imgui_tables.cpp.o.ddi.tmp && mv CMakeFiles/trd-party-lib-dear-imgui.dir/cpp/3rdParty/imgui-1.90.4-docking/imgui_tables.cpp.o.ddi.tmp CMakeFiles/trd-party-lib-dear-imgui.dir/cpp/3rdParty/imgui-1.90.4-docking/imgui_tables.cpp.o.ddi error: no such file or directory: 'USE_WEBGPU=1'
Expectation:
The text was updated successfully, but these errors were encountered: