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

clang-scan-deps is required for CMake 3.28 C++ 20 module support #21042

Closed
ShuangLiu1992 opened this issue Jan 9, 2024 · 6 comments
Closed

Comments

@ShuangLiu1992
Copy link

In
https://chromium.googlesource.com/emscripten-releases/+/refs/heads/main/src/build.py
clang-scan-deps is in the list of unneeded_tool, but it is required by cmake to scan dependencies of cxx 20 modules.
is it possible to include "clang-scan-deps" in emscripten releases?

@sbc100
Copy link
Collaborator

sbc100 commented Jan 9, 2024

Sounds reasonable to me. @dschuff WDYT?

@dschuff
Copy link
Member

dschuff commented Jan 9, 2024

Yeah, I think it would be fine to just add that to the emscripten-releases build.

@dschuff
Copy link
Member

dschuff commented Jan 9, 2024

@ShuangLiu1992
Copy link
Author

thank you

@sxstd001
Copy link

Please provide detailed instructions on how to proceed? Specifically, how can I compile C++20 modules, and what is the proper configuration for CMake?

@sxstd001
Copy link

**if I use Ninja in clion ide compiles wasm, errors: **
clang++: error: unknown argument: '-fmodules-ts'
clang++: error: unknown argument: '-fdeps-file=CMakeFiles/wasm.dir/main.cpp.o.ddi'
clang++: error: unknown argument: '-fdeps-target=CMakeFiles/wasm.dir/main.cpp.o'
clang++: error: unknown argument: '-fdeps-format=p1689r5'

sbc100 added a commit to sbc100/emscripten that referenced this issue May 23, 2024
This is wrapper around clang-scan-deps.  Currently this is just enough
to make C++20 work under cmake.  We don't currently have any actaully
tests of C++20 modules.

See: emscripten-core#21042
Fixes: emscripten-core#1361
sbc100 added a commit to sbc100/emscripten that referenced this issue May 23, 2024
This is wrapper around clang-scan-deps.  Currently this is just enough
to make C++20 work under cmake.  We don't currently have any actaully
tests of C++20 modules.

See: emscripten-core#21042
Fixes: emscripten-core#1361
sbc100 added a commit to sbc100/emscripten that referenced this issue May 23, 2024
This is wrapper around clang-scan-deps.  Currently this is just enough
to make C++20 work under cmake.  We don't currently have any actaully
tests of C++20 modules.

See: emscripten-core#21042
Fixes: emscripten-core#1361
sbc100 added a commit to sbc100/emscripten that referenced this issue May 23, 2024
This is wrapper around clang-scan-deps.  Currently this is just enough
to make C++20 work under cmake.  We don't currently have any actaully
tests of C++20 modules.

See: emscripten-core#21042
Fixes: emscripten-core#1361
sbc100 added a commit to sbc100/emscripten that referenced this issue May 23, 2024
This is wrapper around clang-scan-deps.  Currently this is just enough
to make C++20 work under cmake.  We don't currently have any actaully
tests of C++20 modules.

See: emscripten-core#21042
Fixes: emscripten-core#1361
sbc100 added a commit to sbc100/emscripten that referenced this issue Jan 3, 2025
This is wrapper around clang-scan-deps.  Currently this is just enough
to make C++20 work under cmake.  We don't currently have any actaully
tests of C++20 modules.

See: emscripten-core#21042
Fixes: emscripten-core#1361
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants