-
Notifications
You must be signed in to change notification settings - Fork 647
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
CMakeLists.txt: Do not require C++ by default #3956
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
how have you tested this? on which platform? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks reasonable to me.
i bulid-tested this on macos with and without fast-jit.
(with #3968)
Using the same reasoning, I suppose core/iwasm/compilation/iwasm_compl.cmake requires a similar modification. |
good point. @midokura-xavi92 please test WAMR_BUILD_JIT=1 as well. |
Not really: all files that
So it is the same rationale I already provided for #3926 .
That would require me to build the
Edit: I built As shown in the build step, no C++ files are built. Edit 2: actually, no C++ files were built above only because |
it's included via runtime_lib.cmake. top-level cmake -> runtime_lib.cmake -> iwasm_compl.cmake
you don't need to build wamr-compiler. just llvm.
as our CI in this area is weak, manual testing is a must. alternatively you can improve our CI coverage. it's probably a better idea anyway. :-) |
By default, the project() CMake command defaults to C and C++. [1] Therefore, CMake might perform tests for both C and C++ compilers as part of the configuration phase. However, this has the consequence of the configuration phase to fail if the system does not have a C++ toolchain installed, even if C++ is not really used by the top-level project under the default settings. Some configurations might still require a C++ toolchain, so enable_language is selectively called under such circumstances. [1]: https://cmake.org/cmake/help/latest/command/project.html
249ae66
to
1b7e74b
Compare
You are right - sorry for missing that. I have just updated the branch so that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
By default, the project() CMake command defaults to C and C++. 1 Therefore, CMake might perform tests for both C and C++ compilers as part of the configuration phase.
However, this has the consequence of the configuration phase to fail if the system does not have a C++ toolchain installed, even if C++ is not really used by the top-level project under the default settings.
Some configurations might still require a C++ toolchain, so
enable_language
is selectively called under such circumstances.