Skip to content

Commit 27a1ad6

Browse files
authored
wasm: exclude code that's not used on iOS for Wasm too
It has similar size constraints. Saves ~1.9MB from the Wasm build. Updates tailscale#3157 Signed-off-by: Mihai Parparita <mihai@tailscale.com>
1 parent 4007601 commit 27a1ad6

File tree

11 files changed

+24
-20
lines changed

11 files changed

+24
-20
lines changed

ipn/ipnlocal/peerapi_h2c.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build !ios && !android
6-
// +build !ios,!android
5+
//go:build !ios && !android && !js
6+
// +build !ios,!android,!js
77

88
package ipnlocal
99

ipn/localapi/cert.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build !ios && !android
6-
// +build !ios,!android
5+
//go:build !ios && !android && !js
6+
// +build !ios,!android,!js
77

88
package localapi
99

ipn/localapi/disabled_stubs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build ios || android
6-
// +build ios android
5+
//go:build ios || android || js
6+
// +build ios android js
77

88
package localapi
99

ipn/localapi/profile.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build !ios && !android
6-
// +build !ios,!android
5+
//go:build !ios && !android && !js
6+
// +build !ios,!android,!js
77

88
// We don't include it on mobile where we're more memory constrained and
99
// there's no CLI to get at the results anyway.

net/netns/socks.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build !ios
6-
// +build !ios
5+
//go:build !ios && !js
6+
// +build !ios,!js
77

88
package netns
99

net/portmapper/disabled_stubs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build ios
6-
// +build ios
5+
//go:build ios || js
6+
// +build ios js
77

88
// (https://github.com/tailscale/tailscale/issues/2495)
99

net/portmapper/upnp.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build !ios
6-
// +build !ios
5+
//go:build !ios && !js
6+
// +build !ios,!js
77

88
// (https://github.com/tailscale/tailscale/issues/2495)
99

portlist/netstat.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build !ios
6-
// +build !ios
5+
//go:build !ios && !js
6+
// +build !ios,!js
77

88
package portlist
99

portlist/netstat_exec.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build (windows || freebsd || openbsd || darwin) && !ios
5+
//go:build (windows || freebsd || openbsd || darwin) && !ios && !js
66
// +build windows freebsd openbsd darwin
77
// +build !ios
8+
// +build !js
89

910
package portlist
1011

wgengine/magicsock/debugknobs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build !ios
6-
// +build !ios
5+
//go:build !ios && !js
6+
// +build !ios,!js
77

88
package magicsock
99

0 commit comments

Comments
 (0)