mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-07 13:31:56 +02:00
Saves 328 KB (2.5%) off the minimal binary. For IoT devices that don't need MagicDNS (e.g. they don't make outbound connections), this provides a knob to disable all the DNS functionality. Rather than a massive refactor today, this uses constant false values as a deadcode sledgehammer, guided by shotizam to find the largest DNS functions which survived deadcode. A future refactor could make it so that the net/dns/resolver and publicdns packages don't even show up in the import graph (along with their imports) but really it's already pretty good looking with just these consts, so it's not at the top of my list to refactor it more soon. Also do the same in a few places with the ACME (cert) functionality, as I saw those while searching for DNS stuff. Updates #12614 Change-Id: I8e459f595c2fde68ca16503ff61c8ab339871f97 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
14 lines
468 B
Go
14 lines
468 B
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
// Code generated by gen.go; DO NOT EDIT.
|
|
|
|
//go:build !ts_omit_dns
|
|
|
|
package buildfeatures
|
|
|
|
// HasDNS is whether the binary was built with support for modular feature "MagicDNS and system DNS configuration support".
|
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_dns" build tag.
|
|
// It's a const so it can be used for dead code elimination.
|
|
const HasDNS = true
|