-
-
Notifications
You must be signed in to change notification settings - Fork 780
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
Support moduleonly libraries #4707
Support moduleonly libraries #4707
Conversation
i merged these this pull requests with this #4692 (comment) |
i don't know how to make package kind headeronly work with this, because headeronly package doesn't forward --runtimes so the wrong compiler is used for dependency scanning |
i think VS / VSXmake / CMake generators are OK, i'm doing xmake install/uninstall/package now |
ok i think it's okay now |
Thanks, but this week I don't have vs environment and time to test them in detail, I just can only do some simple syntax style review, if there is not too much problem, I will merge it. If anyone else has the time, welcome to help review and test it. |
no problem, i've already done the next PR (reusage of modules), i'll create the PR after this one is merged |
ruki@0d35ffa77272:/mnt/xmake/tests/projects/c++/modules/link_order$ xmake -r
[ 0%]: <link_order_2> generating.module.deps src/main.cpp
[ 0%]: <link_order_2> generating.module.deps src/foo.mpp
[ 0%]: <link_order_2> generating.module.deps src/bar.mpp
[ 0%]: <bar> generating.module.deps src/bar.mpp
[ 0%]: <foo> generating.module.deps src/foo.mpp
[ 0%]: <link_order_1> generating.module.deps src/main.cpp
[ 0%]: <link_order_1> generating.module.deps src/bar.mpp
[ 0%]: <link_order_1> generating.module.deps src/foo.mpp
[ 37%]: <link_order_2> compiling.module.release duplicate <--------
[ 37%]: <link_order_1> compiling.module.release duplicate
[ 62%]: compiling.release src/main.cpp
[ 62%]: compiling.release src/main.cpp
[ 75%]: linking.release link_order_2
[ 75%]: linking.release link_order_1
[100%]: build ok, spent 0.944s what's the duplicate? |
well, it's module name, It looks a bit unclear without the filename information. |
There are some problems with incremental compilation gcc
clang ruki@0d35ffa77272:/mnt/xmake/tests/projects/c++/modules/dependence$ xmake
[ 81%]: linking.release dependence
[100%]: build ok, spent 0.568s
ruki@0d35ffa77272:/mnt/xmake/tests/projects/c++/modules/dependence$ xmake
[100%]: build ok, spent 0.372s |
gcc ruki@0d35ffa77272:/mnt/xmake/tests/projects/c++/modules/staticlib$ xmake
[ 25%]: compiling.release src/mod.cpp
[ 33%]: archiving.release libmod.a
[ 75%]: compiling.release src/main.cpp
[ 83%]: linking.release hello
[100%]: build ok, spent 1.774s
ruki@0d35ffa77272:/mnt/xmake/tests/projects/c++/modules/staticlib$ xmake
[ 25%]: compiling.release src/mod.cpp
[ 33%]: archiving.release libmod.a
[ 75%]: compiling.release src/main.cpp
[ 83%]: linking.release hello
[100%]: build ok, spent 0.92s |
Maybe we need to add a test for incremental compilation to the test_base of modules. For example, test the output of os.iorunv xmake for the presence of compiling/linking text. |
It does not work in this case #4812 |
should be fixed by #4814 |
Thanks. 👍 |
Thanks. 👍 |
Implement #4673 (comment)
need #4692 so i'll rebase on modules it when merge