Skip to content

Unset IFS after its use in set_build_options_for_host #28811

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 2 commits into from
Dec 17, 2019

Conversation

edymtt
Copy link
Contributor

@edymtt edymtt commented Dec 16, 2019

If IFS remains set, it may cause compilation errors due to unanticipated
replacement of characters in some parameters.

Addresses rdar://problem/57927748

If IFS remains set, it may cause compilation errors due to unanticipated
replacement of characters in some parameters.

Addresses rdar://problem/57927748
@edymtt
Copy link
Contributor Author

edymtt commented Dec 16, 2019

@swift-ci please test

@edymtt
Copy link
Contributor Author

edymtt commented Dec 16, 2019

@swift-ci please test Windows


for target in "${DARWIN_SDK_DEPLOYMENT_TARGETS[@]}"; do
local IFS="-"; triple=($target)
local IFS="-"; triple=($target); unset IFS
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a comment explaining why this is important?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rationale explanation added as part of c1bdb4f

Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we can get away with some regular expressions instead of using ifs and trying to parse out the triple. We really want to discourage people doing much in this script. But, if thats not easy, this is okay to merge. It is correcting a defect, which existed previously.

@edymtt
Copy link
Contributor Author

edymtt commented Dec 16, 2019

@swift-ci please test

@edymtt
Copy link
Contributor Author

edymtt commented Dec 16, 2019

@swift-ci please test Windows

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 330299d

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 330299d

@edymtt
Copy link
Contributor Author

edymtt commented Dec 16, 2019

@swift-ci please test Windows

@edymtt
Copy link
Contributor Author

edymtt commented Dec 16, 2019

@swift-ci please clean test Windows

@edymtt edymtt requested a review from gottesmm December 16, 2019 23:22
@edymtt
Copy link
Contributor Author

edymtt commented Dec 17, 2019

@swift-ci please test OS X

@edymtt edymtt merged commit f67ccf5 into swiftlang:master Dec 17, 2019
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.

4 participants