Uh oh!
There was an error while loading. Please reload this page.
std, stage1: make shared library versioning optional - #6315
Merged
Conversation
ifreund
commented
Sep 10, 2020
Comment on lines
+261
to
+264
| pub fn addSharedLibrary(self: *Builder, name: []const u8, root_src: ?[]const u8, kind: union(enum) { | ||
| versioned: Version, | ||
| unversioned: void, | ||
| }) *LibExeObjStep { |
MemberAuthor
There was a problem hiding this comment.
This takes a tagged union instead of ?Version due to @andrewrk's suggestion in #2230 (comment). However, I'm not sure this achieves the desired effect. Leaving off the version is still the "easier" option, and setting a version becomes more cumbersome:
constlib=b.addSharedLibrary("foo", "foo.zig", .unversioned);constlib=b.addSharedLibrary("foo", "foo.zig", .{ .versioned=b.version(0,1,0) });Contributor
There was a problem hiding this comment.
What if b.version() returned an instance of this union?
That way its: b.version(0,1,0) vs .unversioned.
MemberAuthor
There was a problem hiding this comment.
Good call, seems obvious now.
ifreundforce-pushed
the
optional-shlib-version
branch
from
September 10, 2020 23:40
c1771f9 to
7d10365Compareifreundforce-pushed
the
optional-shlib-version
branch
from
September 11, 2020 00:22
7d10365 to
59f1b2eCompareUh oh!
There was an error while loading. Please reload this page.
This commit changes the behavior of stage1 to emit libfoo.so instead of libfoo.so.0.0.0 when none of the --ver-major, --ver-minor, or --ver-patch flags are set. It also makes it possible to create unversioned shared libraries using the zig build system, changing the version parameter of addSharedLibrary() to a tagged union.
ifreundforce-pushed
the
optional-shlib-version
branch
from
September 11, 2020 08:46
59f1b2e to
0a76a9bCompare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit changes the behavior of stage1 to emit libfoo.so instead
of libfoo.so.0.0.0 when none of the --ver-major, --ver-minor, or
--ver-patch flags are set.
It also makes it possible to create unversioned shared libraries
using the zig build system, changing the version parameter of
addSharedLibrary() to a tagged union.
Closes#2230