Skip to content

Make module naming consistent with the integrated driver when the output filename has 2+ extensions #71

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
Feb 13, 2020

Conversation

owenv
Copy link
Contributor

@owenv owenv commented Feb 13, 2020

This caused a surprising number of tests to fail which wrote something like -o a.out.optimized. The C++ driver uses llvm::sys::path::stem to remove extensions, which would result in a.out, which is an invalid module name, so the fallback of main would be used. swift-driver used to remove both extensions, and would name the module a. This behavior is clearly better, but I think it's too late to change considering how many tests broke...

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

Sigh, compatibility. This is a good fix to match the behavior of the current driver, and it's not important enough to break compatibility over. Any real build tool will always pass down -module-name explicitly anyway.

@DougGregor
Copy link
Member

@swift-ci please test

@DougGregor DougGregor merged commit 7eb61ec into swiftlang:master Feb 13, 2020
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