Skip to content

Use bundled UUID #1819

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 3 commits into from
Jan 17, 2019
Merged

Use bundled UUID #1819

merged 3 commits into from
Jan 17, 2019

Conversation

compnerd
Copy link
Member

Setup the build to build the bundled UUID and port to windows in preparation for supporting Windows as a build target.

@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@swift-ci please test

Add support for building the bundled UUID library.  This ensures that
the UUID behaviours are the same across the different environments and
is needed for supporting Windows which uses some of the UUID APIs which
are not available.
Rather than relying on the system UUID, use the bundled UUID on all the
targets.  There is some work needed to port this to windows, but this
should be sufficient for Linux (and FreeBSD).
This adjusts the UUID code to build on Windows which is needed for the
Foundation port itself.
@compnerd
Copy link
Member Author

CC: @millenomi @parkera

@jakepetroules
Copy link
Contributor

Why not just use CoCreateGuid instead of adding the libuuid dependency?

@compnerd
Copy link
Member Author

compnerd commented Jan 14, 2019

@jakepetroules - because there are auxiliary functions here that need to be re-implemented then. The conversion to from string can be done using Win32 APIs, but, it seems that if we do this, we can avoid the dependency on e2fsprogs on Linux as well. Its a pretty tiny code base, already here, and means that all the ports have the same code base. (Note that I did use CoCreateGuid in the compiler since it didn't need to worry about all the other functions being used)

Copy link
Contributor

@parkera parkera left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

@compnerd compnerd merged commit af232c1 into swiftlang:master Jan 17, 2019
@compnerd compnerd deleted the uuid branch January 17, 2019 01:32
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