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

[stdlib] Initial FreeBSD port. #713

Merged
merged 1 commit into from Dec 25, 2015

Conversation

Projects
None yet
2 participants
@dcci
Member

dcci commented Dec 21, 2015

Dmitri, All the duplication in the overlay code is now gone. Only the module map is duplicated but I'm not too worried about that (would like to hear your opinion). Also, for now, FreeBSD libc is not-entirely-correctly called Glibc -- but I think a renaming can be done later (maybe it should be called Libc?)

Thanks!

Davide

@dcci

This comment has been minimized.

Show comment
Hide comment
@dcci

dcci Dec 21, 2015

Member

This continues the discussion in #664. I wasn't able to update that request which was closed. I'll try to improve my git foo in the future to avoid similar issues.

Member

dcci commented Dec 21, 2015

This continues the discussion in #664. I wasn't able to update that request which was closed. I'll try to improve my git foo in the future to avoid similar issues.

///
/// It's not named just FreeBSD libc so that it doesn't conflict in the event of a
/// future official FreeBSD libc modulemap.
module SwiftGlibc [system] {

This comment has been minimized.

@gribozavr

gribozavr Dec 21, 2015

Collaborator

SwiftGlibc?

I almost feel like this file should be generated with gyb for both platforms from the same source... Gyb supports substitutions for @GLIBC_INCLUDE_PATH@.

Do you think this would make sense?

@gribozavr

gribozavr Dec 21, 2015

Collaborator

SwiftGlibc?

I almost feel like this file should be generated with gyb for both platforms from the same source... Gyb supports substitutions for @GLIBC_INCLUDE_PATH@.

Do you think this would make sense?

This comment has been minimized.

@gribozavr

gribozavr Dec 21, 2015

Collaborator

Take a look at how we handle UnicodeExtendedGraphemeClusters.cpp.gyb as an example.

@gribozavr

gribozavr Dec 21, 2015

Collaborator

Take a look at how we handle UnicodeExtendedGraphemeClusters.cpp.gyb as an example.

This comment has been minimized.

@dcci

dcci Dec 21, 2015

Member

About the first question, yes, I kept the Glibc name around in the hope we can rename that to something more generic in the future -- Libc maybe? (but I preferred to limit the churn in this commit).
About the latter -- I think it definitely makes much more sense to have a machine generating it for us. I think it also makes sense to do that first -- what's your idea?

@dcci

dcci Dec 21, 2015

Member

About the first question, yes, I kept the Glibc name around in the hope we can rename that to something more generic in the future -- Libc maybe? (but I preferred to limit the churn in this commit).
About the latter -- I think it definitely makes much more sense to have a machine generating it for us. I think it also makes sense to do that first -- what's your idea?

This comment has been minimized.

@dcci

dcci Dec 21, 2015

Member

Is there any documentation available on gyb ?

@dcci

dcci Dec 21, 2015

Member

Is there any documentation available on gyb ?

This comment has been minimized.

@gribozavr

gribozavr Dec 22, 2015

Collaborator

There isn't documentation, but you can look at *.gyb files in the source to look up the syntax. As input, gyb accepts text files with Python code in special blocks (either %-lines or %{ ... }% blocks) and ${} substitution expressions.

I think it also makes sense to do that first -- what's your idea?

I'm OK with this happening in order that is easier for you, as long as we arrive at a maintainable codebase with low duplication :)

@gribozavr

gribozavr Dec 22, 2015

Collaborator

There isn't documentation, but you can look at *.gyb files in the source to look up the syntax. As input, gyb accepts text files with Python code in special blocks (either %-lines or %{ ... }% blocks) and ${} substitution expressions.

I think it also makes sense to do that first -- what's your idea?

I'm OK with this happening in order that is easier for you, as long as we arrive at a maintainable codebase with low duplication :)

This comment has been minimized.

@gribozavr

gribozavr Dec 22, 2015

Collaborator

And of course there is ./utils/gyb.py --help, somehow forgot about that.

@gribozavr

gribozavr Dec 22, 2015

Collaborator

And of course there is ./utils/gyb.py --help, somehow forgot about that.

@gribozavr

This comment has been minimized.

Show comment
Hide comment
@gribozavr

gribozavr Dec 21, 2015

Collaborator

@dcci Thank you, I like this direction a lot!

I think you might want to adjust this line so that the library name is libc on FreeBSD:

add_swift_library(swiftGlibc

Also, the module name is inferred from the first source file name. You might need to add some CMake plumbing to allow passing down an explicit module name.

Collaborator

gribozavr commented Dec 21, 2015

@dcci Thank you, I like this direction a lot!

I think you might want to adjust this line so that the library name is libc on FreeBSD:

add_swift_library(swiftGlibc

Also, the module name is inferred from the first source file name. You might need to add some CMake plumbing to allow passing down an explicit module name.

@gribozavr

This comment has been minimized.

Show comment
Hide comment
@gribozavr

gribozavr Dec 25, 2015

Collaborator

@dcci Just let me know if you want to merge this as is, and refactor later.

Collaborator

gribozavr commented Dec 25, 2015

@dcci Just let me know if you want to merge this as is, and refactor later.

@gribozavr gribozavr self-assigned this Dec 25, 2015

@dcci

This comment has been minimized.

Show comment
Hide comment
@dcci

dcci Dec 25, 2015

Member

Let's go for merging as is if you dont mind. I'll refactor immediately after the end of the christmas break.

Member

dcci commented Dec 25, 2015

Let's go for merging as is if you dont mind. I'll refactor immediately after the end of the christmas break.

gribozavr added a commit that referenced this pull request Dec 25, 2015

Merge pull request #713 from dcci/stdlib
[stdlib] Initial FreeBSD port.

@gribozavr gribozavr merged commit a954ebe into apple:master Dec 25, 2015

@gribozavr

This comment has been minimized.

Show comment
Hide comment
@gribozavr

gribozavr Dec 25, 2015

Collaborator

@dcci Merged, thank you!

Collaborator

gribozavr commented Dec 25, 2015

@dcci Merged, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment