Skip to content

Patch for c++20 modules raw support - #253

Closed
ChemistAion wants to merge 1 commit into
ubisoft:mainfrom
ChemistAion:modules-patch
Closed

Patch for c++20 modules raw support#253
ChemistAion wants to merge 1 commit into
ubisoft:mainfrom
ChemistAion:modules-patch

Conversation

@ChemistAion

Copy link
Copy Markdown

This is work of @Cheaterdev, details are in:
#145
#146

@ChemistAion

ChemistAion commented Mar 10, 2023

Copy link
Copy Markdown
Author

This one-liner (by @Cheaterdev) allows to work with c++20 modules flawlessly, could you please do some regression tests on this?
...since @belkiss (involved in these discussions) stopped responding :|

@jspelletier

Copy link
Copy Markdown
Collaborator

belkiss is no longer working at ubisoft, sadly. I will take a look at this in the next few days.

@jspelletier jspelletier self-assigned this Mar 21, 2023
@ChemistAion

Copy link
Copy Markdown
Author

@jspelletier: ack, I appreciate it... waiting for yours analysis

@jspelletier

jspelletier commented Mar 21, 2023

Copy link
Copy Markdown
Collaborator

this modifies a bunch of vcxproj and adds a lots of unwanted project reference to our vcxproj.

Why don't you instead set ExportAdditionalLibrariesEvenForStaticLib to true in your configurations? Would be equivalent to the if condition that you removed(I think). Or if this is not possible and doesn't work, would need to hide this new behavior behind some feature flag(possibly a new bool in Project.Configuration)

@ChemistAion

Copy link
Copy Markdown
Author

I will conduct some tests based on your recommendation, give me a few hours.

@Cheaterdev

Copy link
Copy Markdown

this modifies a bunch of vcxproj and adds a lots of unwanted project reference to our vcxproj.

Why don't you instead set ExportAdditionalLibrariesEvenForStaticLib to true in your configurations? Would be equivalent to the if condition that you removed(I think). Or if this is not possible and doesn't work, would need to hide this new behavior behind some feature flag(possibly a new bool in Project.Configuration)

Because when having multiple projects with modules it starts exporting lib files as well and linker is going crazy - a lot of duplicates. We just need proper references between projects, nothing more.

@jspelletier
jspelletier changed the base branch from dev to main April 6, 2023 12:51
@Cheaterdev

Cheaterdev commented Feb 9, 2026

Copy link
Copy Markdown

Thought it was merged... still I struggle with the official version. I really need to have the dependencies between projects. Just dependencies, nothing more. ExportAdditionalLibrariesEvenForStaticLib has side effect - it exports the same code in every lib that uses it and in the end - there is a lot of linker messages with multiple symbols.

I believe you don't want to have the dependencies between libraries so code could compile in parallel without need of waiting of compilation results from dependency projects. But its an optimization of specific case. I believe it shouldn't be by default.

If you don't want break current behavior - maybe its better to introduce conf.ForceProjectDependencies for that?

Edit: Just saw other topics and even forgot I had the same proposition before. Still hoping for other MR submit :)

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

Successfully merging this pull request may close these issues.

3 participants