Skip to content

build: indicate VC++ CRT type for Windows builds #15797

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

Merged
merged 1 commit into from
Apr 7, 2018

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Apr 6, 2018

Indicate whether the debug or release CRT is in use when building for
Windows.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

Indicate whether the debug or release CRT is in use when building for
Windows.
@troughton
Copy link
Contributor

troughton commented Apr 6, 2018

Would it be better for the debug CRT to be conditional on DEBUG, since there are multiple types of release builds?

As a side note: is there actually a benefit to using the debug CRT? It doesn’t seem particularly useful for Swift binaries/libraries, and it’s a little odd that the compiler’s build configuration (or technically the stdlib) alters the produced Swift binaries.

@compnerd
Copy link
Member Author

compnerd commented Apr 6, 2018

It actually is useful, the debug CRT is able to actually do additional debugging (like malloc tracing). This is just displaying the value. I don't have a problem with changing the condition, but I think that is better done in a follow up.

@compnerd
Copy link
Member Author

compnerd commented Apr 6, 2018

@swift-ci please test and merge

@troughton
Copy link
Contributor

Is there a way to implement it so that the configuration of the built Swift product (e.g. with swiftc -O for release) determines which CRT is used? Is it possible to leave the CRT symbols unresolved for the stdlib and then link against it when linking the final Swift executable?

As an aside, I still think RELEASE is the wrong condition here. I could go either way on RelWithDebInfo builds, but I definitely think MinSizeRel should use the non-debug CRT.

@swift-ci swift-ci merged commit 8353b4c into swiftlang:master Apr 7, 2018
@compnerd compnerd deleted the crt branch September 12, 2018 05:22
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