Commit Graph

6 Commits

Author SHA1 Message Date
moncho e101d8396d portlist, version: update build tags for Go 1.16, Apple M1
Build tags have been updated to build native Apple M1 binaries, existing build
tags for ios have been changed from darwin,arm64 to ios,arm64.

With this change, running go build cmd/tailscale{,d}/tailscale{,d}.go on an Apple
machine with the new processor works and resulting binaries show the expected
architecture, e.g. tailscale: Mach-O 64-bit executable arm64.

Tested using go version go1.16beta1 darwin/arm64.

Updates #943

Signed-off-by: moncho <50428+moncho@users.noreply.github.com>
2021-02-09 21:10:12 -08:00
Brad Fitzpatrick 2072dcc127 version: revert the filepath change from earlier commit
f81233524f changed a use of package 'path' to 'filepath'.
Restore it back to 'path', with a comment.

Also, use the os.Executable-based fallback name in the case where the
binary itself doesn't have Go module information. That was overlooked in
the original code.
2020-07-30 08:03:33 -07:00
Avery Pennarun f81233524f version/cmdname: s/path/filepath/ and fix version.ReadExe() fallback.
We were using the Go 'path' module, which apparently doesn't handle
backslashes correctly. path/filepath does.

However, the main bug turned out to be that we were not calling .Base()
on the path if version.ReadExe() fails, which it seems to do at least
on Windows 7. As a result, our logfile persistence was not working on
Windows, and logids would be regenerated on every restart.

Affects: #620

Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
2020-07-30 04:52:20 -04:00
Brad Fitzpatrick 5c9ddf5e76 version: fix typo in comment 2020-06-08 10:30:16 -07:00
Brad Fitzpatrick 277fe84c6b version: don't depend on goversion on ios 2020-04-07 09:28:09 -07:00
Brad Fitzpatrick f266e2d1eb version: add CmdName func for future use by logpolicy
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>

Change-Id: I02a7c907844f71242ef06ed097f2a92ece7ae091
2020-02-19 11:34:45 -08:00