Skip to content

Fix -latomic linking condition, include android #38508

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
Jul 20, 2021

Conversation

rjmccall
Copy link
Contributor

#38501 was copy-and-pasting a condition that seems to have been wrong. I've left the original code in place and just fixed this site. I've also removed the architecture conditions — I think this is necessary on all arches — and by @buttaface's request I've added Android to the condition.

@rjmccall rjmccall requested a review from compnerd July 20, 2021 19:15
@rjmccall
Copy link
Contributor Author

@swift-ci Please test

list(APPEND swift_concurrency_link_libraries
atomic)
endif()
if(SWIFT_HOST_VARIANT STREQUAL "linux" OR
Copy link
Contributor

Choose a reason for hiding this comment

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

Was the change from Linux to linux on purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, SWIFT_HOST_VARIANT seems to generally be lowercase. That's the primary thing this fixes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As far as I can tell, the code I copy-and-pasted from is inoperative.

Copy link
Member

Choose a reason for hiding this comment

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

A shorter way to write this would be SWIFT_HOST_VARIANT MATCHES "linux|android", thanks for adding Android.

Copy link
Contributor

Choose a reason for hiding this comment

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

Are the legal values for SWIFT_HOST_VARIANT documented somewhere?

Copy link
Member

Choose a reason for hiding this comment

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

They are defined here, I count eight possible hosts.

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 3b13066dd2253f0b8b2943dceaa97fc49f591713

@rjmccall rjmccall force-pushed the link-libatomic-concurrency-2 branch from 3b13066 to 2ff1719 Compare July 20, 2021 20:22
@rjmccall
Copy link
Contributor Author

@swift-ci Please test Linux

@rjmccall
Copy link
Contributor Author

@swift-ci Please smoke test macOS

1 similar comment
@rjmccall
Copy link
Contributor Author

@swift-ci Please smoke test macOS

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