[swift-dev] Why are we re-linking?
Jordan Rose
jordan_rose at apple.com
Fri May 6 11:16:00 CDT 2016
Hm. That might be a nice balance, and it’s not entirely a lie: that’s the version of the compiler that you’re using, if not the stdlib and runtime. I’d still like to put it behind a flag, so that we can turn it off it certain configurations, like #2105 <https://github.com/apple/swift/pull/2105> attempted to do.
Dmitri, any comments, since you caught the issue last time?
Jordan
> On May 5, 2016, at 21:12, rintaro ishizaki <fs.output at gmail.com> wrote:
>
> Sorry, accidentally clicked send button..
>
> I've wrote PoC code here:
> https://github.com/rintaro/swift/commit/9bf18d46f4933ace03948417087bade084104edb <https://github.com/rintaro/swift/commit/9bf18d46f4933ace03948417087bade084104edb>
>
> Of course, this changes the semantics of `--version` output.
> So I'm not sure we can accept this or not.
> Any thought?
>
> Rintaro
>
> 2016-05-06 13:08 GMT+09:00 rintaro ishizaki <fs.output at gmail.com <mailto:fs.output at gmail.com>>:
> Hi all,
>
> getSwiftFullVersion output must take account stdlib revsion?
>
> How about get the revision hash from the Swift repository
> *excluding* stdlib/, test/ and validation-test/ directories.
>
> git log -1 --pretty=format:%H -- \
> . \
> :(exclude)stdlib \
> :(exclude)test \
> :(exclude)validation-test
>
> Instead of,
>
> git log -1 --pretty=format:%H
>
> Or more specifically, just include only "compiler" related directories:
>
> git log -1 --pretty=format:%H -- include/ lib/ tools/
>
> I've wrote PoC code
>
>
> 2016-04-12 2:22 GMT+09:00 Jordan Rose via swift-dev <swift-dev at swift.org <mailto:swift-dev at swift.org>>:
>
>> On Apr 7, 2016, at 14:01, Chris Lattner <clattner at apple.com <mailto:clattner at apple.com>> wrote:
>>
>>
>>> On Apr 6, 2016, at 11:08 AM, Jordan Rose via swift-dev <swift-dev at swift.org <mailto:swift-dev at swift.org>> wrote:
>>>
>>> I imagine it's because your git hash has changed, which is used in the --version output for swiftc. I'm not sure how to avoid that cost entirely, but we could add a CMake option to not do it (which you could set locally), and we could probably move it to a library that isn't used by most of those tools (so that we're only re-linking swiftc).
>>
>> Could we move the hash to be a text file stored next to the executables in the installdir? That way the text file gets updated, but not the binaries?
>
> Oh, that's clever. Maybe that's good enough for local builds. I'd want to be careful about it for the binary we ship (to not waste an fstat).
>
> FWIW this isn't quite just --version output; we also stamp it into swiftmodule files. But any build with an actual submission tag will use that instead.
>
> Jordan
>
>
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org <mailto:swift-dev at swift.org>
> https://lists.swift.org/mailman/listinfo/swift-dev <https://lists.swift.org/mailman/listinfo/swift-dev>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160506/126c6096/attachment.html>
More information about the swift-dev
mailing list