So code (in upcoming PRs) can test for the build tags with consts and get dead code elimination from the compiler+linker. Updates #12614 Change-Id: If6160453ffd01b798f09894141e7631a93385941 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>main
parent
082c6a25b0
commit
17ffa80138
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_aws
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// AWS is whether the binary was built with support for modular feature "AWS integration".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_aws" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const AWS = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_aws
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// AWS is whether the binary was built with support for modular feature "AWS integration".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_aws" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const AWS = true |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_bird
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// Bird is whether the binary was built with support for modular feature "Bird BGP integration".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_bird" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const Bird = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_bird
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// Bird is whether the binary was built with support for modular feature "Bird BGP integration".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_bird" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const Bird = true |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_capture
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// Capture is whether the binary was built with support for modular feature "Packet capture".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_capture" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const Capture = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_capture
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// Capture is whether the binary was built with support for modular feature "Packet capture".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_capture" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const Capture = true |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_completion
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// Completion is whether the binary was built with support for modular feature "CLI shell completion".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_completion" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const Completion = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_completion
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// Completion is whether the binary was built with support for modular feature "CLI shell completion".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_completion" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const Completion = true |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_debugeventbus
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// DebugEventBus is whether the binary was built with support for modular feature "eventbus debug support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_debugeventbus" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const DebugEventBus = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_debugeventbus
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// DebugEventBus is whether the binary was built with support for modular feature "eventbus debug support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_debugeventbus" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const DebugEventBus = true |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_desktop_sessions
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// DesktopSessions is whether the binary was built with support for modular feature "Desktop sessions support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_desktop_sessions" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const DesktopSessions = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_desktop_sessions
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// DesktopSessions is whether the binary was built with support for modular feature "Desktop sessions support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_desktop_sessions" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const DesktopSessions = true |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_drive
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// Drive is whether the binary was built with support for modular feature "Tailscale Drive (file server) support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_drive" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const Drive = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_drive
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// Drive is whether the binary was built with support for modular feature "Tailscale Drive (file server) support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_drive" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const Drive = true |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_kube
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// Kube is whether the binary was built with support for modular feature "Kubernetes integration".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_kube" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const Kube = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_kube
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// Kube is whether the binary was built with support for modular feature "Kubernetes integration".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_kube" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const Kube = true |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_relayserver
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// RelayServer is whether the binary was built with support for modular feature "Relay server".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_relayserver" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const RelayServer = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_relayserver
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// RelayServer is whether the binary was built with support for modular feature "Relay server".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_relayserver" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const RelayServer = true |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_serve
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// Serve is whether the binary was built with support for modular feature "Serve and Funnel support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_serve" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const Serve = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_serve
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// Serve is whether the binary was built with support for modular feature "Serve and Funnel support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_serve" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const Serve = true |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_ssh
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// SSH is whether the binary was built with support for modular feature "Tailscale SSH support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_ssh" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const SSH = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_ssh
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// SSH is whether the binary was built with support for modular feature "Tailscale SSH support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_ssh" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const SSH = true |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_syspolicy
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// SystemPolicy is whether the binary was built with support for modular feature "System policy configuration (MDM) support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_syspolicy" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const SystemPolicy = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_syspolicy
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// SystemPolicy is whether the binary was built with support for modular feature "System policy configuration (MDM) support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_syspolicy" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const SystemPolicy = true |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_systray
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// SysTray is whether the binary was built with support for modular feature "Linux system tray".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_systray" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const SysTray = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_systray
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// SysTray is whether the binary was built with support for modular feature "Linux system tray".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_systray" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const SysTray = true |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_taildrop
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// Taildrop is whether the binary was built with support for modular feature "Taildrop (file sending) support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_taildrop" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const Taildrop = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_taildrop
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// Taildrop is whether the binary was built with support for modular feature "Taildrop (file sending) support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_taildrop" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const Taildrop = true |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_tailnetlock
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// TailnetLock is whether the binary was built with support for modular feature "Tailnet Lock support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_tailnetlock" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const TailnetLock = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_tailnetlock
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// TailnetLock is whether the binary was built with support for modular feature "Tailnet Lock support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_tailnetlock" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const TailnetLock = true |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_tap
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// Tap is whether the binary was built with support for modular feature "Experimental Layer 2 (ethernet) support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_tap" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const Tap = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_tap
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// Tap is whether the binary was built with support for modular feature "Experimental Layer 2 (ethernet) support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_tap" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const Tap = true |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_tpm
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// TPM is whether the binary was built with support for modular feature "TPM support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_tpm" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const TPM = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_tpm
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// TPM is whether the binary was built with support for modular feature "TPM support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_tpm" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const TPM = true |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_wakeonlan
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// WakeOnLAN is whether the binary was built with support for modular feature "Wake-on-LAN support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_wakeonlan" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const WakeOnLAN = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_wakeonlan
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// WakeOnLAN is whether the binary was built with support for modular feature "Wake-on-LAN support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_wakeonlan" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const WakeOnLAN = true |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build ts_omit_webclient
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// WebClient is whether the binary was built with support for modular feature "Web client support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_webclient" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const WebClient = false |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code generated by gen-featuretags.go; DO NOT EDIT.
|
||||||
|
|
||||||
|
//go:build !ts_omit_webclient
|
||||||
|
|
||||||
|
package featuretags |
||||||
|
|
||||||
|
// WebClient is whether the binary was built with support for modular feature "Web client support".
|
||||||
|
// Specifically, it's whether the binary was NOT built with the "ts_omit_webclient" build tag.
|
||||||
|
// It's a const so it can be used for dead code elimination.
|
||||||
|
const WebClient = true |
||||||
@ -0,0 +1,49 @@ |
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
//go:build ignore
|
||||||
|
|
||||||
|
// The gen-featuretags.go program generates the feature_<feature>_enabled.go
|
||||||
|
// and feature_<feature>_disabled.go files for each feature tag.
|
||||||
|
package main |
||||||
|
|
||||||
|
import ( |
||||||
|
"cmp" |
||||||
|
"fmt" |
||||||
|
"os" |
||||||
|
"strings" |
||||||
|
|
||||||
|
"tailscale.com/feature/featuretags" |
||||||
|
"tailscale.com/util/must" |
||||||
|
) |
||||||
|
|
||||||
|
const header = `// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
// Code g|e|n|e|r|a|t|e|d by gen-featuretags.go; D|O N|OT E|D|I|T.
|
||||||
|
|
||||||
|
` |
||||||
|
|
||||||
|
func main() { |
||||||
|
header := strings.ReplaceAll(header, "|", "") // to avoid this file being marked as generated
|
||||||
|
for k, m := range featuretags.Features { |
||||||
|
if !k.IsOmittable() { |
||||||
|
continue |
||||||
|
} |
||||||
|
sym := cmp.Or(m.Sym, strings.ToUpper(string(k)[:1])+string(k)[1:]) |
||||||
|
for _, suf := range []string{"enabled", "disabled"} { |
||||||
|
bang := "" |
||||||
|
if suf == "enabled" { |
||||||
|
bang = "!" // !ts_omit_...
|
||||||
|
} |
||||||
|
must.Do(os.WriteFile("feature_"+string(k)+"_"+suf+".go", |
||||||
|
fmt.Appendf(nil, "%s//go:build %s%s\n\npackage featuretags\n\n"+ |
||||||
|
"// %s is whether the binary was built with support for modular feature %q.\n"+ |
||||||
|
"// Specifically, it's whether the binary was NOT built with the %q build tag.\n"+ |
||||||
|
"// It's a const so it can be used for dead code elimination.\n"+ |
||||||
|
"const %s = %t\n", |
||||||
|
header, bang, k.OmitTag(), sym, m.Desc, k.OmitTag(), sym, suf == "enabled"), 0644)) |
||||||
|
|
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
Loading…
Reference in new issue