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

add RemoveUnreferencedCodeData option to disable /Zc:inline #1606

Merged
merged 1 commit into from
Apr 6, 2021

Conversation

withmorten
Copy link
Contributor

What does this PR do?

This PR adds the option to properly toggle this Visual Studio project build option: https://docs.microsoft.com/en-us/cpp/build/reference/zc-inline-remove-unreferenced-comdat?view=msvc-160

How does this PR change Premake's behavior?

When specifying removeunreferencedcodedata "On" or "Off", <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> or false will be added to the vcxproj in each build config, similar to usefullpaths.

When it is not specified, nothing changes.

Anything else we should know?

By default, Visual Studio assumes this value to be true, when it is not specified. I was annoyed by this (I wanted to replicate compile options from an old project) and decided to add this.

I pretty much just copypasted the usefullpaths behaviour, so I don't expect this to misbehave :)

Did you check all the boxes?

  • [ x ] Focus on a single fix or feature; remove any unrelated formatting or code changes
  • [ x ] Add unit tests showing fix or feature works; all tests pass
  • [ x ] Mention any related issues (put closes #XXXX in comment to auto-close issue when PR is merged)
  • [ x ] Follow our coding conventions
  • [ x ] Minimize the number of commits

You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!

Copy link
Member

@starkos starkos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've just recently rolled out a new website that allows the documentation to be stored in the main repository. Would it possible to add a documentation page for this new method? Just copy from one of the pages inwebsite/docs and then add it to website/sidebar.js in alpha order. You would need to rebase against the latest changes to see the new site files (which will help getting this merged as well).

@withmorten
Copy link
Contributor Author

Done! I hope I did everything correct, couldn't really preview it. I "guessed" the version it would be available in as alpha 16, hope that was okay :D

Copy link
Member

@starkos starkos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@starkos starkos merged commit 9542711 into premake:master Apr 6, 2021
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.

2 participants