diff --git a/builder/tools-builtin.go b/builder/tools-builtin.go index 29dfa8613..e5ecd424c 100644 --- a/builder/tools-builtin.go +++ b/builder/tools-builtin.go @@ -1,3 +1,4 @@ +//go:build byollvm // +build byollvm package builder diff --git a/builder/tools-external.go b/builder/tools-external.go index 4955bd2c7..b2af00fb0 100644 --- a/builder/tools-external.go +++ b/builder/tools-external.go @@ -1,3 +1,4 @@ +//go:build !byollvm // +build !byollvm package builder diff --git a/src/device/arm/scb.go b/src/device/arm/scb.go index c3d782e06..007ecec9d 100644 --- a/src/device/arm/scb.go +++ b/src/device/arm/scb.go @@ -1,6 +1,7 @@ // Hand created file. DO NOT DELETE. // Cortex-M System Control Block-related definitions. +//go:build cortexm // +build cortexm package arm diff --git a/src/examples/can/feather-m4-can.go b/src/examples/can/feather-m4-can.go index e60552a44..a97099ca6 100644 --- a/src/examples/can/feather-m4-can.go +++ b/src/examples/can/feather-m4-can.go @@ -1,3 +1,4 @@ +//go:build feather_m4_can // +build feather_m4_can package main diff --git a/src/examples/caninterrupt/feather-m4-can.go b/src/examples/caninterrupt/feather-m4-can.go index e60552a44..a97099ca6 100644 --- a/src/examples/caninterrupt/feather-m4-can.go +++ b/src/examples/caninterrupt/feather-m4-can.go @@ -1,3 +1,4 @@ +//go:build feather_m4_can // +build feather_m4_can package main diff --git a/src/examples/dac/circuitplay_express.go b/src/examples/dac/circuitplay_express.go index 386135abd..6ca853e75 100644 --- a/src/examples/dac/circuitplay_express.go +++ b/src/examples/dac/circuitplay_express.go @@ -1,3 +1,4 @@ +//go:build circuitplay_express // +build circuitplay_express package main diff --git a/src/examples/dac/pyportal.go b/src/examples/dac/pyportal.go index 0e014d500..31f37c127 100644 --- a/src/examples/dac/pyportal.go +++ b/src/examples/dac/pyportal.go @@ -1,3 +1,4 @@ +//go:build pyportal // +build pyportal package main diff --git a/src/examples/pininterrupt/circuitplay-express.go b/src/examples/pininterrupt/circuitplay-express.go index e37105c2c..743bf99e6 100644 --- a/src/examples/pininterrupt/circuitplay-express.go +++ b/src/examples/pininterrupt/circuitplay-express.go @@ -1,3 +1,4 @@ +//go:build circuitplay_express // +build circuitplay_express package main diff --git a/src/examples/pininterrupt/pca10040.go b/src/examples/pininterrupt/pca10040.go index 828252746..db169ced3 100644 --- a/src/examples/pininterrupt/pca10040.go +++ b/src/examples/pininterrupt/pca10040.go @@ -1,3 +1,4 @@ +//go:build pca10040 // +build pca10040 package main diff --git a/src/examples/pininterrupt/stm32.go b/src/examples/pininterrupt/stm32.go index 30a86313b..a9047f2c5 100644 --- a/src/examples/pininterrupt/stm32.go +++ b/src/examples/pininterrupt/stm32.go @@ -1,3 +1,4 @@ +//go:build stm32 // +build stm32 package main diff --git a/src/examples/pininterrupt/wioterminal.go b/src/examples/pininterrupt/wioterminal.go index a9fbfc849..9a98b15b8 100644 --- a/src/examples/pininterrupt/wioterminal.go +++ b/src/examples/pininterrupt/wioterminal.go @@ -1,3 +1,4 @@ +//go:build wioterminal // +build wioterminal package main diff --git a/src/examples/pwm/arduino-mega1280.go b/src/examples/pwm/arduino-mega1280.go index 824d2bdad..2cf5d8364 100644 --- a/src/examples/pwm/arduino-mega1280.go +++ b/src/examples/pwm/arduino-mega1280.go @@ -1,3 +1,4 @@ +//go:build arduino_mega1280 // +build arduino_mega1280 package main diff --git a/src/examples/pwm/arduino.go b/src/examples/pwm/arduino.go index f6739b5f9..3186bf4e7 100644 --- a/src/examples/pwm/arduino.go +++ b/src/examples/pwm/arduino.go @@ -1,3 +1,4 @@ +//go:build arduino // +build arduino package main diff --git a/src/examples/pwm/bluepill.go b/src/examples/pwm/bluepill.go index b8fe1c7eb..e676f58f4 100644 --- a/src/examples/pwm/bluepill.go +++ b/src/examples/pwm/bluepill.go @@ -1,3 +1,4 @@ +//go:build bluepill // +build bluepill package main diff --git a/src/examples/pwm/feather-m4.go b/src/examples/pwm/feather-m4.go index 1c77be8b7..c00539b98 100644 --- a/src/examples/pwm/feather-m4.go +++ b/src/examples/pwm/feather-m4.go @@ -1,3 +1,4 @@ +//go:build feather_m4 // +build feather_m4 package main diff --git a/src/examples/pwm/itsybitsy-m0.go b/src/examples/pwm/itsybitsy-m0.go index c0b2f7d74..fe401e8c3 100644 --- a/src/examples/pwm/itsybitsy-m0.go +++ b/src/examples/pwm/itsybitsy-m0.go @@ -1,3 +1,4 @@ +//go:build itsybitsy_m0 // +build itsybitsy_m0 package main diff --git a/src/examples/pwm/itsybitsy-m4.go b/src/examples/pwm/itsybitsy-m4.go index 1e13f9ef6..5926fb1bf 100644 --- a/src/examples/pwm/itsybitsy-m4.go +++ b/src/examples/pwm/itsybitsy-m4.go @@ -1,3 +1,4 @@ +//go:build itsybitsy_m4 // +build itsybitsy_m4 package main diff --git a/src/examples/pwm/nucleo-f722ze.go b/src/examples/pwm/nucleo-f722ze.go index fdd0f67f9..b23816d0f 100644 --- a/src/examples/pwm/nucleo-f722ze.go +++ b/src/examples/pwm/nucleo-f722ze.go @@ -1,3 +1,4 @@ +//go:build stm32f7 // +build stm32f7 package main diff --git a/src/examples/pwm/nucleo-l031k6.go b/src/examples/pwm/nucleo-l031k6.go index 59f32c174..6de19f88c 100644 --- a/src/examples/pwm/nucleo-l031k6.go +++ b/src/examples/pwm/nucleo-l031k6.go @@ -1,3 +1,4 @@ +//go:build stm32l0 // +build stm32l0 package main diff --git a/src/examples/pwm/nucleo-l432kc.go b/src/examples/pwm/nucleo-l432kc.go index 09298e814..0663541f3 100644 --- a/src/examples/pwm/nucleo-l432kc.go +++ b/src/examples/pwm/nucleo-l432kc.go @@ -1,3 +1,4 @@ +//go:build stm32l4 // +build stm32l4 package main diff --git a/src/examples/pwm/nucleo-l552ze.go b/src/examples/pwm/nucleo-l552ze.go index 7ae31dc36..d09557a7e 100644 --- a/src/examples/pwm/nucleo-l552ze.go +++ b/src/examples/pwm/nucleo-l552ze.go @@ -1,3 +1,4 @@ +//go:build stm32l5 // +build stm32l5 package main diff --git a/src/examples/pwm/pico.go b/src/examples/pwm/pico.go index 0c0c0a83d..87c592a4e 100644 --- a/src/examples/pwm/pico.go +++ b/src/examples/pwm/pico.go @@ -1,3 +1,4 @@ +//go:build pico // +build pico package main diff --git a/src/examples/pwm/stm32f4disco.go b/src/examples/pwm/stm32f4disco.go index baa34e994..87b30c82f 100644 --- a/src/examples/pwm/stm32f4disco.go +++ b/src/examples/pwm/stm32f4disco.go @@ -1,3 +1,4 @@ +//go:build stm32f4disco // +build stm32f4disco package main diff --git a/src/machine/board_arduino.go b/src/machine/board_arduino.go index 001ba9c70..e78153f18 100644 --- a/src/machine/board_arduino.go +++ b/src/machine/board_arduino.go @@ -1,3 +1,4 @@ +//go:build arduino // +build arduino package machine diff --git a/src/machine/board_arduino_mega1280.go b/src/machine/board_arduino_mega1280.go index 289b55b2b..961fcec23 100644 --- a/src/machine/board_arduino_mega1280.go +++ b/src/machine/board_arduino_mega1280.go @@ -1,3 +1,4 @@ +//go:build arduino_mega1280 // +build arduino_mega1280 package machine diff --git a/src/machine/board_arduino_mega2560.go b/src/machine/board_arduino_mega2560.go index c6370139e..f47504bd1 100644 --- a/src/machine/board_arduino_mega2560.go +++ b/src/machine/board_arduino_mega2560.go @@ -1,3 +1,4 @@ +//go:build arduino_mega2560 // +build arduino_mega2560 package machine diff --git a/src/machine/board_arduino_mkr1000.go b/src/machine/board_arduino_mkr1000.go index 30ad48e90..b7d2b51ab 100644 --- a/src/machine/board_arduino_mkr1000.go +++ b/src/machine/board_arduino_mkr1000.go @@ -1,3 +1,4 @@ +//go:build arduino_mkr1000 // +build arduino_mkr1000 // This contains the pin mappings for the Arduino MKR1000 board. diff --git a/src/machine/board_arduino_mkrwifi1010.go b/src/machine/board_arduino_mkrwifi1010.go index 8703e1353..89eb25d8f 100644 --- a/src/machine/board_arduino_mkrwifi1010.go +++ b/src/machine/board_arduino_mkrwifi1010.go @@ -1,3 +1,4 @@ +//go:build arduino_mkrwifi1010 // +build arduino_mkrwifi1010 // This contains the pin mappings for the Arduino MKR WiFi 1010 board. diff --git a/src/machine/board_arduino_nano.go b/src/machine/board_arduino_nano.go index d84b23f36..d3213d4f1 100644 --- a/src/machine/board_arduino_nano.go +++ b/src/machine/board_arduino_nano.go @@ -1,3 +1,4 @@ +//go:build arduino_nano // +build arduino_nano package machine diff --git a/src/machine/board_arduino_nano33.go b/src/machine/board_arduino_nano33.go index 76353bacc..49cb09c83 100644 --- a/src/machine/board_arduino_nano33.go +++ b/src/machine/board_arduino_nano33.go @@ -1,3 +1,4 @@ +//go:build arduino_nano33 // +build arduino_nano33 // This contains the pin mappings for the Arduino Nano33 IoT board. diff --git a/src/machine/board_arduino_zero.go b/src/machine/board_arduino_zero.go index 651eea821..3c04f37a4 100644 --- a/src/machine/board_arduino_zero.go +++ b/src/machine/board_arduino_zero.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd21 && arduino_zero // +build sam,atsamd21,arduino_zero package machine diff --git a/src/machine/board_atmega328p.go b/src/machine/board_atmega328p.go index 030c78fe9..007d31640 100644 --- a/src/machine/board_atmega328p.go +++ b/src/machine/board_atmega328p.go @@ -1,3 +1,4 @@ +//go:build (avr && atmega328p) || arduino || arduino_nano // +build avr,atmega328p arduino arduino_nano package machine diff --git a/src/machine/board_atsamd21.go b/src/machine/board_atsamd21.go index 3b11b452a..619af02b2 100644 --- a/src/machine/board_atsamd21.go +++ b/src/machine/board_atsamd21.go @@ -1,3 +1,4 @@ +//go:build (sam && atsamd21) || arduino_nano33 || circuitplay_express // +build sam,atsamd21 arduino_nano33 circuitplay_express package machine diff --git a/src/machine/board_atsame54-xpro.go b/src/machine/board_atsame54-xpro.go index 173ccae5f..8c2606577 100644 --- a/src/machine/board_atsame54-xpro.go +++ b/src/machine/board_atsame54-xpro.go @@ -1,3 +1,4 @@ +//go:build atsame54_xpro // +build atsame54_xpro package machine diff --git a/src/machine/board_circuitplay_bluefruit.go b/src/machine/board_circuitplay_bluefruit.go index 0fd699e58..bfa7cb2ca 100644 --- a/src/machine/board_circuitplay_bluefruit.go +++ b/src/machine/board_circuitplay_bluefruit.go @@ -1,3 +1,4 @@ +//go:build circuitplay_bluefruit // +build circuitplay_bluefruit package machine diff --git a/src/machine/board_circuitplay_express.go b/src/machine/board_circuitplay_express.go index 23037a1e8..28f59df27 100644 --- a/src/machine/board_circuitplay_express.go +++ b/src/machine/board_circuitplay_express.go @@ -1,3 +1,4 @@ +//go:build circuitplay_express // +build circuitplay_express package machine diff --git a/src/machine/board_clue_alpha.go b/src/machine/board_clue_alpha.go index d8def8f35..bb3024072 100644 --- a/src/machine/board_clue_alpha.go +++ b/src/machine/board_clue_alpha.go @@ -1,3 +1,4 @@ +//go:build clue_alpha // +build clue_alpha package machine diff --git a/src/machine/board_digispark.go b/src/machine/board_digispark.go index af89656d2..55531d556 100644 --- a/src/machine/board_digispark.go +++ b/src/machine/board_digispark.go @@ -1,3 +1,4 @@ +//go:build digispark // +build digispark package machine diff --git a/src/machine/board_esp32-coreboard-v2.go b/src/machine/board_esp32-coreboard-v2.go index 0145fe4ea..cbeb54dc1 100644 --- a/src/machine/board_esp32-coreboard-v2.go +++ b/src/machine/board_esp32-coreboard-v2.go @@ -1,3 +1,4 @@ +//go:build esp32_coreboard_v2 // +build esp32_coreboard_v2 package machine diff --git a/src/machine/board_fe310.go b/src/machine/board_fe310.go index b6e88a3c7..70c266345 100644 --- a/src/machine/board_fe310.go +++ b/src/machine/board_fe310.go @@ -1,3 +1,4 @@ +//go:build hifive1b // +build hifive1b package machine diff --git a/src/machine/board_feather-m0.go b/src/machine/board_feather-m0.go index cfef7288d..a0c71f56c 100644 --- a/src/machine/board_feather-m0.go +++ b/src/machine/board_feather-m0.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd21 && feather_m0 // +build sam,atsamd21,feather_m0 package machine diff --git a/src/machine/board_feather-m4-can.go b/src/machine/board_feather-m4-can.go index 5e9d464f5..7bc1a6e3e 100644 --- a/src/machine/board_feather-m4-can.go +++ b/src/machine/board_feather-m4-can.go @@ -1,3 +1,4 @@ +//go:build feather_m4_can // +build feather_m4_can package machine diff --git a/src/machine/board_feather-m4.go b/src/machine/board_feather-m4.go index 901a18723..07783964d 100644 --- a/src/machine/board_feather-m4.go +++ b/src/machine/board_feather-m4.go @@ -1,3 +1,4 @@ +//go:build feather_m4 // +build feather_m4 package machine diff --git a/src/machine/board_feather-nrf52840-sense.go b/src/machine/board_feather-nrf52840-sense.go index 8a4f71446..ae98ce84d 100644 --- a/src/machine/board_feather-nrf52840-sense.go +++ b/src/machine/board_feather-nrf52840-sense.go @@ -1,3 +1,4 @@ +//go:build feather_nrf52840_sense // +build feather_nrf52840_sense package machine diff --git a/src/machine/board_feather-nrf52840.go b/src/machine/board_feather-nrf52840.go index e433e1037..42cdf582b 100644 --- a/src/machine/board_feather-nrf52840.go +++ b/src/machine/board_feather-nrf52840.go @@ -1,3 +1,4 @@ +//go:build feather_nrf52840 // +build feather_nrf52840 package machine diff --git a/src/machine/board_feather-stm32f405.go b/src/machine/board_feather-stm32f405.go index 0fd149567..1e695a43a 100644 --- a/src/machine/board_feather-stm32f405.go +++ b/src/machine/board_feather-stm32f405.go @@ -1,3 +1,4 @@ +//go:build feather_stm32f405 // +build feather_stm32f405 package machine diff --git a/src/machine/board_feather_rp2040.go b/src/machine/board_feather_rp2040.go index 77981b230..98ecd1740 100644 --- a/src/machine/board_feather_rp2040.go +++ b/src/machine/board_feather_rp2040.go @@ -1,3 +1,4 @@ +//go:build feather_rp2040 // +build feather_rp2040 package machine diff --git a/src/machine/board_grandcentral-m4.go b/src/machine/board_grandcentral-m4.go index 7f0a7390f..61201826f 100644 --- a/src/machine/board_grandcentral-m4.go +++ b/src/machine/board_grandcentral-m4.go @@ -1,3 +1,4 @@ +//go:build grandcentral_m4 // +build grandcentral_m4 package machine diff --git a/src/machine/board_hifive1b.go b/src/machine/board_hifive1b.go index d16225a68..7e3001a61 100644 --- a/src/machine/board_hifive1b.go +++ b/src/machine/board_hifive1b.go @@ -1,3 +1,4 @@ +//go:build hifive1b // +build hifive1b package machine diff --git a/src/machine/board_hifive1b_baremetal.go b/src/machine/board_hifive1b_baremetal.go index 729e985de..28d276f23 100644 --- a/src/machine/board_hifive1b_baremetal.go +++ b/src/machine/board_hifive1b_baremetal.go @@ -1,3 +1,4 @@ +//go:build fe310 && hifive1b // +build fe310,hifive1b package machine diff --git a/src/machine/board_itsybitsy-m0.go b/src/machine/board_itsybitsy-m0.go index 30bf8f2b0..22b2daa7f 100644 --- a/src/machine/board_itsybitsy-m0.go +++ b/src/machine/board_itsybitsy-m0.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd21 && itsybitsy_m0 // +build sam,atsamd21,itsybitsy_m0 package machine diff --git a/src/machine/board_itsybitsy-m4.go b/src/machine/board_itsybitsy-m4.go index b88e44fd3..f42efee98 100644 --- a/src/machine/board_itsybitsy-m4.go +++ b/src/machine/board_itsybitsy-m4.go @@ -1,3 +1,4 @@ +//go:build itsybitsy_m4 // +build itsybitsy_m4 package machine diff --git a/src/machine/board_itsybitsy-nrf52840.go b/src/machine/board_itsybitsy-nrf52840.go index 418e83839..a003704c2 100644 --- a/src/machine/board_itsybitsy-nrf52840.go +++ b/src/machine/board_itsybitsy-nrf52840.go @@ -1,3 +1,4 @@ +//go:build itsybitsy_nrf52840 // +build itsybitsy_nrf52840 package machine diff --git a/src/machine/board_k210.go b/src/machine/board_k210.go index 60467a689..d476fee87 100644 --- a/src/machine/board_k210.go +++ b/src/machine/board_k210.go @@ -1,3 +1,4 @@ +//go:build maixbit // +build maixbit // Chip datasheet: https://s3.cn-north-1.amazonaws.com.cn/dl.kendryte.com/documents/kendryte_datasheet_20181011163248_en.pdf diff --git a/src/machine/board_lgt92.go b/src/machine/board_lgt92.go index e043dcd77..7a4da00bb 100644 --- a/src/machine/board_lgt92.go +++ b/src/machine/board_lgt92.go @@ -1,3 +1,4 @@ +//go:build lgt92 // +build lgt92 package machine diff --git a/src/machine/board_m5stack.go b/src/machine/board_m5stack.go index 0f05146c2..5273034fb 100644 --- a/src/machine/board_m5stack.go +++ b/src/machine/board_m5stack.go @@ -1,3 +1,4 @@ +//go:build m5stack // +build m5stack package machine diff --git a/src/machine/board_m5stack_core2.go b/src/machine/board_m5stack_core2.go index cb20b2ae1..93b0b618d 100644 --- a/src/machine/board_m5stack_core2.go +++ b/src/machine/board_m5stack_core2.go @@ -1,3 +1,4 @@ +//go:build m5stack_core2 // +build m5stack_core2 package machine diff --git a/src/machine/board_maixbit.go b/src/machine/board_maixbit.go index e2c551b0e..b633ac423 100644 --- a/src/machine/board_maixbit.go +++ b/src/machine/board_maixbit.go @@ -1,3 +1,4 @@ +//go:build maixbit // +build maixbit package machine diff --git a/src/machine/board_maixbit_baremetal.go b/src/machine/board_maixbit_baremetal.go index 98733bee8..5c9ab7704 100644 --- a/src/machine/board_maixbit_baremetal.go +++ b/src/machine/board_maixbit_baremetal.go @@ -1,3 +1,4 @@ +//go:build k210 && maixbit // +build k210,maixbit package machine diff --git a/src/machine/board_matrixportal-m4.go b/src/machine/board_matrixportal-m4.go index c733e784a..cab5f7aa1 100644 --- a/src/machine/board_matrixportal-m4.go +++ b/src/machine/board_matrixportal-m4.go @@ -1,3 +1,4 @@ +//go:build matrixportal_m4 // +build matrixportal_m4 package machine diff --git a/src/machine/board_mdbt50qrx.go b/src/machine/board_mdbt50qrx.go index 45a059ded..3d66fbb28 100644 --- a/src/machine/board_mdbt50qrx.go +++ b/src/machine/board_mdbt50qrx.go @@ -1,3 +1,4 @@ +//go:build mdbt50qrx // +build mdbt50qrx package machine diff --git a/src/machine/board_metro-m4-airlift.go b/src/machine/board_metro-m4-airlift.go index d70220eb9..2350ea71b 100644 --- a/src/machine/board_metro-m4-airlift.go +++ b/src/machine/board_metro-m4-airlift.go @@ -1,3 +1,4 @@ +//go:build metro_m4_airlift // +build metro_m4_airlift package machine diff --git a/src/machine/board_microbit-v2.go b/src/machine/board_microbit-v2.go index 81ccf5be2..20c0bc808 100644 --- a/src/machine/board_microbit-v2.go +++ b/src/machine/board_microbit-v2.go @@ -1,3 +1,4 @@ +//go:build microbit_v2 // +build microbit_v2 package machine diff --git a/src/machine/board_microbit.go b/src/machine/board_microbit.go index b4af49f8d..37c7d3348 100644 --- a/src/machine/board_microbit.go +++ b/src/machine/board_microbit.go @@ -1,3 +1,4 @@ +//go:build microbit // +build microbit package machine diff --git a/src/machine/board_nano-rp2040.go b/src/machine/board_nano-rp2040.go index d91a26589..1e30ca67d 100644 --- a/src/machine/board_nano-rp2040.go +++ b/src/machine/board_nano-rp2040.go @@ -1,3 +1,4 @@ +//go:build nano_rp2040 // +build nano_rp2040 // This contains the pin mappings for the Arduino Nano RP2040 Connect board. diff --git a/src/machine/board_nicenano.go b/src/machine/board_nicenano.go index 94511bf9f..8baf86fa0 100644 --- a/src/machine/board_nicenano.go +++ b/src/machine/board_nicenano.go @@ -1,3 +1,4 @@ +//go:build nicenano // +build nicenano package machine diff --git a/src/machine/board_nodemcu.go b/src/machine/board_nodemcu.go index f9f1af4f9..b3dbc3358 100644 --- a/src/machine/board_nodemcu.go +++ b/src/machine/board_nodemcu.go @@ -1,3 +1,4 @@ +//go:build nodemcu // +build nodemcu // Pinout for the NodeMCU dev kit. diff --git a/src/machine/board_nrf52840-mdk-usb-dongle.go b/src/machine/board_nrf52840-mdk-usb-dongle.go index 57a3d1976..c1910fecf 100644 --- a/src/machine/board_nrf52840-mdk-usb-dongle.go +++ b/src/machine/board_nrf52840-mdk-usb-dongle.go @@ -1,3 +1,4 @@ +//go:build nrf52840_mdk_usb_dongle // +build nrf52840_mdk_usb_dongle package machine diff --git a/src/machine/board_nrf52840-mdk.go b/src/machine/board_nrf52840-mdk.go index fbc42861b..262983c3a 100644 --- a/src/machine/board_nrf52840-mdk.go +++ b/src/machine/board_nrf52840-mdk.go @@ -1,3 +1,4 @@ +//go:build nrf52840_mdk // +build nrf52840_mdk package machine diff --git a/src/machine/board_nucleof103rb.go b/src/machine/board_nucleof103rb.go index 22580e20b..3027c5ad5 100644 --- a/src/machine/board_nucleof103rb.go +++ b/src/machine/board_nucleof103rb.go @@ -1,3 +1,4 @@ +//go:build nucleof103rb // +build nucleof103rb package machine diff --git a/src/machine/board_nucleof722ze.go b/src/machine/board_nucleof722ze.go index 41d3f2849..4206e39d4 100644 --- a/src/machine/board_nucleof722ze.go +++ b/src/machine/board_nucleof722ze.go @@ -1,3 +1,4 @@ +//go:build nucleof722ze // +build nucleof722ze package machine diff --git a/src/machine/board_nucleol031k6.go b/src/machine/board_nucleol031k6.go index fe85f276b..cc0fbe15b 100644 --- a/src/machine/board_nucleol031k6.go +++ b/src/machine/board_nucleol031k6.go @@ -1,3 +1,4 @@ +//go:build nucleol031k6 // +build nucleol031k6 package machine diff --git a/src/machine/board_nucleol432kc.go b/src/machine/board_nucleol432kc.go index bfebd1eed..d8c91d06d 100644 --- a/src/machine/board_nucleol432kc.go +++ b/src/machine/board_nucleol432kc.go @@ -1,3 +1,4 @@ +//go:build nucleol432kc // +build nucleol432kc package machine diff --git a/src/machine/board_nucleol552ze.go b/src/machine/board_nucleol552ze.go index a0d3ee522..d34f40d64 100644 --- a/src/machine/board_nucleol552ze.go +++ b/src/machine/board_nucleol552ze.go @@ -1,3 +1,4 @@ +//go:build nucleol552ze // +build nucleol552ze package machine diff --git a/src/machine/board_p1am-100.go b/src/machine/board_p1am-100.go index e263746ad..e75d464b6 100644 --- a/src/machine/board_p1am-100.go +++ b/src/machine/board_p1am-100.go @@ -1,3 +1,4 @@ +//go:build p1am_100 // +build p1am_100 // This contains the pin mappings for the ProductivityOpen P1AM-100 board. diff --git a/src/machine/board_particle_argon.go b/src/machine/board_particle_argon.go index 9427029f4..48df2e435 100644 --- a/src/machine/board_particle_argon.go +++ b/src/machine/board_particle_argon.go @@ -1,3 +1,4 @@ +//go:build particle_argon // +build particle_argon package machine diff --git a/src/machine/board_particle_boron.go b/src/machine/board_particle_boron.go index b6a2c3e54..103cfbb62 100644 --- a/src/machine/board_particle_boron.go +++ b/src/machine/board_particle_boron.go @@ -1,3 +1,4 @@ +//go:build particle_boron // +build particle_boron package machine diff --git a/src/machine/board_particle_xenon.go b/src/machine/board_particle_xenon.go index 0b25f373b..5a902186e 100644 --- a/src/machine/board_particle_xenon.go +++ b/src/machine/board_particle_xenon.go @@ -1,3 +1,4 @@ +//go:build particle_xenon // +build particle_xenon package machine diff --git a/src/machine/board_pca10031.go b/src/machine/board_pca10031.go index 122c00d20..afcd3593a 100644 --- a/src/machine/board_pca10031.go +++ b/src/machine/board_pca10031.go @@ -1,3 +1,4 @@ +//go:build pca10031 // +build pca10031 // pca10031 is a nrf51 based dongle, intended for use in wireless applications. diff --git a/src/machine/board_pca10040.go b/src/machine/board_pca10040.go index f425ca37c..03189ad14 100644 --- a/src/machine/board_pca10040.go +++ b/src/machine/board_pca10040.go @@ -1,3 +1,4 @@ +//go:build pca10040 // +build pca10040 package machine diff --git a/src/machine/board_pca10056.go b/src/machine/board_pca10056.go index 783629465..df6bbb871 100644 --- a/src/machine/board_pca10056.go +++ b/src/machine/board_pca10056.go @@ -1,3 +1,4 @@ +//go:build pca10056 // +build pca10056 package machine diff --git a/src/machine/board_pca10059.go b/src/machine/board_pca10059.go index 7f6167913..42be8f3ab 100644 --- a/src/machine/board_pca10059.go +++ b/src/machine/board_pca10059.go @@ -1,3 +1,4 @@ +//go:build pca10059 // +build pca10059 package machine diff --git a/src/machine/board_pico.go b/src/machine/board_pico.go index 2cbba390d..b26395497 100644 --- a/src/machine/board_pico.go +++ b/src/machine/board_pico.go @@ -1,3 +1,4 @@ +//go:build pico // +build pico package machine diff --git a/src/machine/board_pinetime-devkit0.go b/src/machine/board_pinetime-devkit0.go index b9669c84d..e71f9e97d 100644 --- a/src/machine/board_pinetime-devkit0.go +++ b/src/machine/board_pinetime-devkit0.go @@ -1,3 +1,4 @@ +//go:build pinetime_devkit0 // +build pinetime_devkit0 package machine diff --git a/src/machine/board_pybadge.go b/src/machine/board_pybadge.go index f747286d5..69b814a5c 100644 --- a/src/machine/board_pybadge.go +++ b/src/machine/board_pybadge.go @@ -1,3 +1,4 @@ +//go:build pybadge // +build pybadge package machine diff --git a/src/machine/board_pygamer.go b/src/machine/board_pygamer.go index 4662e3a65..319e9e95f 100644 --- a/src/machine/board_pygamer.go +++ b/src/machine/board_pygamer.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd51 && pygamer // +build sam,atsamd51,pygamer package machine diff --git a/src/machine/board_pyportal.go b/src/machine/board_pyportal.go index e8dfc0b1b..3e7aa7cb7 100644 --- a/src/machine/board_pyportal.go +++ b/src/machine/board_pyportal.go @@ -1,3 +1,4 @@ +//go:build pyportal // +build pyportal package machine diff --git a/src/machine/board_qtpy.go b/src/machine/board_qtpy.go index 04ef57185..aa294b81e 100644 --- a/src/machine/board_qtpy.go +++ b/src/machine/board_qtpy.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd21 && qtpy // +build sam,atsamd21,qtpy package machine diff --git a/src/machine/board_reelboard.go b/src/machine/board_reelboard.go index 7fd715bb7..c8383c1fb 100644 --- a/src/machine/board_reelboard.go +++ b/src/machine/board_reelboard.go @@ -1,3 +1,4 @@ +//go:build reelboard // +build reelboard package machine diff --git a/src/machine/board_stm32f469disco.go b/src/machine/board_stm32f469disco.go index db20aca72..07a51c0bb 100644 --- a/src/machine/board_stm32f469disco.go +++ b/src/machine/board_stm32f469disco.go @@ -1,3 +1,4 @@ +//go:build stm32f469disco // +build stm32f469disco package machine diff --git a/src/machine/board_teensy36.go b/src/machine/board_teensy36.go index 8fa71f6e9..106382be3 100644 --- a/src/machine/board_teensy36.go +++ b/src/machine/board_teensy36.go @@ -1,3 +1,4 @@ +//go:build nxp && mk66f18 && teensy36 // +build nxp,mk66f18,teensy36 package machine diff --git a/src/machine/board_teensy40.go b/src/machine/board_teensy40.go index f96f63de7..9f6f8617e 100644 --- a/src/machine/board_teensy40.go +++ b/src/machine/board_teensy40.go @@ -1,3 +1,4 @@ +//go:build teensy40 // +build teensy40 package machine diff --git a/src/machine/board_trinket.go b/src/machine/board_trinket.go index 06f2ace3e..34f271910 100644 --- a/src/machine/board_trinket.go +++ b/src/machine/board_trinket.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd21 && trinket_m0 // +build sam,atsamd21,trinket_m0 package machine diff --git a/src/machine/board_wioterminal.go b/src/machine/board_wioterminal.go index 0726b1acb..c19de4642 100644 --- a/src/machine/board_wioterminal.go +++ b/src/machine/board_wioterminal.go @@ -1,3 +1,4 @@ +//go:build wioterminal // +build wioterminal package machine diff --git a/src/machine/board_x9pro.go b/src/machine/board_x9pro.go index 111dcf5fd..5e2d67769 100644 --- a/src/machine/board_x9pro.go +++ b/src/machine/board_x9pro.go @@ -1,3 +1,4 @@ +//go:build x9pro // +build x9pro package machine diff --git a/src/machine/board_xiao.go b/src/machine/board_xiao.go index 108346ada..aa8c44045 100644 --- a/src/machine/board_xiao.go +++ b/src/machine/board_xiao.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd21 && xiao // +build sam,atsamd21,xiao package machine diff --git a/src/machine/i2s.go b/src/machine/i2s.go index caecc0661..91c97ec9f 100644 --- a/src/machine/i2s.go +++ b/src/machine/i2s.go @@ -1,3 +1,4 @@ +//go:build sam // +build sam // This is the definition for I2S bus functions. diff --git a/src/machine/machine_atmega.go b/src/machine/machine_atmega.go index 6e2b59cf1..41d5192cb 100644 --- a/src/machine/machine_atmega.go +++ b/src/machine/machine_atmega.go @@ -1,3 +1,4 @@ +//go:build avr && atmega // +build avr,atmega package machine diff --git a/src/machine/machine_atmega1280.go b/src/machine/machine_atmega1280.go index 391c27405..6c286f18b 100644 --- a/src/machine/machine_atmega1280.go +++ b/src/machine/machine_atmega1280.go @@ -1,3 +1,4 @@ +//go:build avr && atmega1280 // +build avr,atmega1280 package machine diff --git a/src/machine/machine_atmega1284p.go b/src/machine/machine_atmega1284p.go index 83a88906d..633a4e9c8 100644 --- a/src/machine/machine_atmega1284p.go +++ b/src/machine/machine_atmega1284p.go @@ -1,3 +1,4 @@ +//go:build avr && atmega1284p // +build avr,atmega1284p package machine diff --git a/src/machine/machine_atmega2560.go b/src/machine/machine_atmega2560.go index d50f9081d..2cc97cdb8 100644 --- a/src/machine/machine_atmega2560.go +++ b/src/machine/machine_atmega2560.go @@ -1,3 +1,4 @@ +//go:build avr && atmega2560 // +build avr,atmega2560 package machine diff --git a/src/machine/machine_atmega328p.go b/src/machine/machine_atmega328p.go index ecb3c1b88..ee92c1b52 100644 --- a/src/machine/machine_atmega328p.go +++ b/src/machine/machine_atmega328p.go @@ -1,3 +1,4 @@ +//go:build avr && atmega328p // +build avr,atmega328p package machine diff --git a/src/machine/machine_atmega328pb.go b/src/machine/machine_atmega328pb.go index 38c26dfb6..afae4798d 100644 --- a/src/machine/machine_atmega328pb.go +++ b/src/machine/machine_atmega328pb.go @@ -1,3 +1,4 @@ +//go:build avr && atmega328pb // +build avr,atmega328pb package machine diff --git a/src/machine/machine_atsamd21.go b/src/machine/machine_atsamd21.go index cb151703a..92f21b0a5 100644 --- a/src/machine/machine_atsamd21.go +++ b/src/machine/machine_atsamd21.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd21 // +build sam,atsamd21 // Peripheral abstraction layer for the atsamd21. diff --git a/src/machine/machine_atsamd21e18.go b/src/machine/machine_atsamd21e18.go index fd4f5d091..f019d6125 100644 --- a/src/machine/machine_atsamd21e18.go +++ b/src/machine/machine_atsamd21e18.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd21 && atsamd21e18 // +build sam,atsamd21,atsamd21e18 // Peripheral abstraction layer for the atsamd21. diff --git a/src/machine/machine_atsamd21g18.go b/src/machine/machine_atsamd21g18.go index 44cc5828b..aece56f47 100644 --- a/src/machine/machine_atsamd21g18.go +++ b/src/machine/machine_atsamd21g18.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd21 && atsamd21g18 // +build sam,atsamd21,atsamd21g18 // Peripheral abstraction layer for the atsamd21. diff --git a/src/machine/machine_atsamd51g19.go b/src/machine/machine_atsamd51g19.go index f50701f12..e8c8f69a3 100644 --- a/src/machine/machine_atsamd51g19.go +++ b/src/machine/machine_atsamd51g19.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd51 && atsamd51g19 // +build sam,atsamd51,atsamd51g19 // Peripheral abstraction layer for the atsamd51. diff --git a/src/machine/machine_atsamd51j19.go b/src/machine/machine_atsamd51j19.go index c29d9a7a0..9e74deee6 100644 --- a/src/machine/machine_atsamd51j19.go +++ b/src/machine/machine_atsamd51j19.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd51 && atsamd51j19 // +build sam,atsamd51,atsamd51j19 // Peripheral abstraction layer for the atsamd51. diff --git a/src/machine/machine_atsamd51j20.go b/src/machine/machine_atsamd51j20.go index 966114e0b..68b1f8ee8 100644 --- a/src/machine/machine_atsamd51j20.go +++ b/src/machine/machine_atsamd51j20.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd51 && atsamd51j20 // +build sam,atsamd51,atsamd51j20 // Peripheral abstraction layer for the atsamd51. diff --git a/src/machine/machine_atsamd51p19.go b/src/machine/machine_atsamd51p19.go index b642fae7b..458d6b626 100644 --- a/src/machine/machine_atsamd51p19.go +++ b/src/machine/machine_atsamd51p19.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd51 && atsamd51p19 // +build sam,atsamd51,atsamd51p19 // Peripheral abstraction layer for the atsamd51. diff --git a/src/machine/machine_atsamd51p20.go b/src/machine/machine_atsamd51p20.go index e5d0faa04..c8312fb55 100644 --- a/src/machine/machine_atsamd51p20.go +++ b/src/machine/machine_atsamd51p20.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd51 && atsamd51p20 // +build sam,atsamd51,atsamd51p20 // Peripheral abstraction layer for the atsamd51. diff --git a/src/machine/machine_atsame51j19.go b/src/machine/machine_atsame51j19.go index 3064648e5..01e73869c 100644 --- a/src/machine/machine_atsame51j19.go +++ b/src/machine/machine_atsame51j19.go @@ -1,3 +1,4 @@ +//go:build sam && atsame51 && atsame51j19 // +build sam,atsame51,atsame51j19 // Peripheral abstraction layer for the atsame51. diff --git a/src/machine/machine_atsame54p20.go b/src/machine/machine_atsame54p20.go index 2a49019c9..74ab5f3ce 100644 --- a/src/machine/machine_atsame54p20.go +++ b/src/machine/machine_atsame54p20.go @@ -1,3 +1,4 @@ +//go:build sam && atsame5x && atsame54p20 // +build sam,atsame5x,atsame54p20 // Peripheral abstraction layer for the atsame54. diff --git a/src/machine/machine_atsame5x_can.go b/src/machine/machine_atsame5x_can.go index 9cad660ec..47be30514 100644 --- a/src/machine/machine_atsame5x_can.go +++ b/src/machine/machine_atsame5x_can.go @@ -1,3 +1,4 @@ +//go:build (sam && atsame51) || (sam && atsame54) // +build sam,atsame51 sam,atsame54 package machine diff --git a/src/machine/machine_attiny85.go b/src/machine/machine_attiny85.go index 5a6c37c7b..002a1feab 100644 --- a/src/machine/machine_attiny85.go +++ b/src/machine/machine_attiny85.go @@ -1,3 +1,4 @@ +//go:build attiny85 // +build attiny85 package machine diff --git a/src/machine/machine_esp32.go b/src/machine/machine_esp32.go index 31a324829..b2187e78f 100644 --- a/src/machine/machine_esp32.go +++ b/src/machine/machine_esp32.go @@ -1,3 +1,4 @@ +//go:build esp32 // +build esp32 package machine diff --git a/src/machine/machine_esp32c3.go b/src/machine/machine_esp32c3.go index 39ac78bb1..695615c19 100644 --- a/src/machine/machine_esp32c3.go +++ b/src/machine/machine_esp32c3.go @@ -1,3 +1,4 @@ +//go:build esp32c3 // +build esp32c3 package machine diff --git a/src/machine/machine_esp8266.go b/src/machine/machine_esp8266.go index a5fbbc672..77fb0ba63 100644 --- a/src/machine/machine_esp8266.go +++ b/src/machine/machine_esp8266.go @@ -1,3 +1,4 @@ +//go:build esp8266 // +build esp8266 package machine diff --git a/src/machine/machine_fe310.go b/src/machine/machine_fe310.go index 609571ea2..7a1360204 100644 --- a/src/machine/machine_fe310.go +++ b/src/machine/machine_fe310.go @@ -1,3 +1,4 @@ +//go:build fe310 // +build fe310 package machine diff --git a/src/machine/machine_gameboyadvance.go b/src/machine/machine_gameboyadvance.go index c35b7ef3b..9c7c83926 100644 --- a/src/machine/machine_gameboyadvance.go +++ b/src/machine/machine_gameboyadvance.go @@ -1,3 +1,4 @@ +//go:build gameboyadvance // +build gameboyadvance package machine diff --git a/src/machine/machine_generic.go b/src/machine/machine_generic.go index cbcc98ecf..51ea63c04 100644 --- a/src/machine/machine_generic.go +++ b/src/machine/machine_generic.go @@ -1,3 +1,4 @@ +//go:build !baremetal // +build !baremetal package machine diff --git a/src/machine/machine_generic_peripherals.go b/src/machine/machine_generic_peripherals.go index 03146e8b2..a9ac85d5f 100644 --- a/src/machine/machine_generic_peripherals.go +++ b/src/machine/machine_generic_peripherals.go @@ -1,3 +1,4 @@ +//go:build !baremetal && !arduino_mkr1000 && !arduino_mkrwifi1010 && !arduino_nano33 && !arduino_zero && !circuitplay_express && !feather_m0 && !feather_m4 && !grandcentral_m4 && !itsybitsy_m0 && !itsybitsy_m4 && !matrixportal_m4 && !metro_m4_airlift && !p1am_100 && !pybadge && !pygamer && !pyportal && !qtpy && !trinket_m0 && !wioterminal && !xiao // +build !baremetal,!arduino_mkr1000,!arduino_mkrwifi1010,!arduino_nano33,!arduino_zero,!circuitplay_express,!feather_m0,!feather_m4,!grandcentral_m4,!itsybitsy_m0,!itsybitsy_m4,!matrixportal_m4,!metro_m4_airlift,!p1am_100,!pybadge,!pygamer,!pyportal,!qtpy,!trinket_m0,!wioterminal,!xiao package machine diff --git a/src/machine/machine_k210.go b/src/machine/machine_k210.go index 4a8bc98f1..364406001 100644 --- a/src/machine/machine_k210.go +++ b/src/machine/machine_k210.go @@ -1,3 +1,4 @@ +//go:build k210 // +build k210 package machine diff --git a/src/machine/machine_mimxrt1062.go b/src/machine/machine_mimxrt1062.go index bcb06021a..05d79b2a5 100644 --- a/src/machine/machine_mimxrt1062.go +++ b/src/machine/machine_mimxrt1062.go @@ -1,3 +1,4 @@ +//go:build mimxrt1062 // +build mimxrt1062 package machine diff --git a/src/machine/machine_mimxrt1062_uart.go b/src/machine/machine_mimxrt1062_uart.go index b61fd04f0..95813d836 100644 --- a/src/machine/machine_mimxrt1062_uart.go +++ b/src/machine/machine_mimxrt1062_uart.go @@ -1,3 +1,4 @@ +//go:build mimxrt1062 // +build mimxrt1062 package machine diff --git a/src/machine/machine_nrf51.go b/src/machine/machine_nrf51.go index d60dc5f16..9068df0b4 100644 --- a/src/machine/machine_nrf51.go +++ b/src/machine/machine_nrf51.go @@ -1,3 +1,4 @@ +//go:build nrf51 // +build nrf51 package machine diff --git a/src/machine/machine_nrf52.go b/src/machine/machine_nrf52.go index 45e481593..f5c6ed240 100644 --- a/src/machine/machine_nrf52.go +++ b/src/machine/machine_nrf52.go @@ -1,3 +1,4 @@ +//go:build nrf52 // +build nrf52 package machine diff --git a/src/machine/machine_nrf52833.go b/src/machine/machine_nrf52833.go index 73f86f157..1d1ab961c 100644 --- a/src/machine/machine_nrf52833.go +++ b/src/machine/machine_nrf52833.go @@ -1,3 +1,4 @@ +//go:build nrf52833 // +build nrf52833 package machine diff --git a/src/machine/machine_nrf52840.go b/src/machine/machine_nrf52840.go index d7d6ae2b3..f0a59f549 100644 --- a/src/machine/machine_nrf52840.go +++ b/src/machine/machine_nrf52840.go @@ -1,3 +1,4 @@ +//go:build nrf52840 // +build nrf52840 package machine diff --git a/src/machine/machine_nrf52840_usb.go b/src/machine/machine_nrf52840_usb.go index 82a44afe6..098424a35 100644 --- a/src/machine/machine_nrf52840_usb.go +++ b/src/machine/machine_nrf52840_usb.go @@ -1,3 +1,4 @@ +//go:build nrf52840 // +build nrf52840 package machine diff --git a/src/machine/machine_nrf52840_usb_reset_bossa.go b/src/machine/machine_nrf52840_usb_reset_bossa.go index 42c6ad000..1125696eb 100644 --- a/src/machine/machine_nrf52840_usb_reset_bossa.go +++ b/src/machine/machine_nrf52840_usb_reset_bossa.go @@ -1,3 +1,4 @@ +//go:build nrf52840 && nrf52840_reset_bossa // +build nrf52840,nrf52840_reset_bossa package machine diff --git a/src/machine/machine_nrf52840_usb_reset_none.go b/src/machine/machine_nrf52840_usb_reset_none.go index 796a021e7..a7a998878 100644 --- a/src/machine/machine_nrf52840_usb_reset_none.go +++ b/src/machine/machine_nrf52840_usb_reset_none.go @@ -1,3 +1,4 @@ +//go:build nrf52840 && !nrf52840_reset_uf2 && !nrf52840_reset_bossa // +build nrf52840,!nrf52840_reset_uf2,!nrf52840_reset_bossa package machine diff --git a/src/machine/machine_nrf52840_usb_reset_uf2.go b/src/machine/machine_nrf52840_usb_reset_uf2.go index e1d15cd5e..ec685529e 100644 --- a/src/machine/machine_nrf52840_usb_reset_uf2.go +++ b/src/machine/machine_nrf52840_usb_reset_uf2.go @@ -1,3 +1,4 @@ +//go:build nrf52840 && nrf52840_reset_uf2 // +build nrf52840,nrf52840_reset_uf2 package machine diff --git a/src/machine/machine_nrf528xx.go b/src/machine/machine_nrf528xx.go index 2cf2e10bd..02fe9ebc1 100644 --- a/src/machine/machine_nrf528xx.go +++ b/src/machine/machine_nrf528xx.go @@ -1,3 +1,4 @@ +//go:build nrf52 || nrf52840 || nrf52833 // +build nrf52 nrf52840 nrf52833 package machine diff --git a/src/machine/machine_nxpmk66f18.go b/src/machine/machine_nxpmk66f18.go index aaecee536..a8257b0b3 100644 --- a/src/machine/machine_nxpmk66f18.go +++ b/src/machine/machine_nxpmk66f18.go @@ -27,6 +27,7 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +//go:build nxp && mk66f18 // +build nxp,mk66f18 package machine diff --git a/src/machine/machine_nxpmk66f18_uart.go b/src/machine/machine_nxpmk66f18_uart.go index 2d8eae016..ccbb18edb 100644 --- a/src/machine/machine_nxpmk66f18_uart.go +++ b/src/machine/machine_nxpmk66f18_uart.go @@ -27,6 +27,7 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +//go:build nxp && mk66f18 // +build nxp,mk66f18 package machine diff --git a/src/machine/machine_rp2040_adc.go b/src/machine/machine_rp2040_adc.go index 5598c6b73..c9631e39b 100644 --- a/src/machine/machine_rp2040_adc.go +++ b/src/machine/machine_rp2040_adc.go @@ -1,3 +1,4 @@ +//go:build rp2040 // +build rp2040 package machine diff --git a/src/machine/machine_rp2040_clocks.go b/src/machine/machine_rp2040_clocks.go index 38da5ffa7..3a0c714a7 100644 --- a/src/machine/machine_rp2040_clocks.go +++ b/src/machine/machine_rp2040_clocks.go @@ -1,3 +1,4 @@ +//go:build rp2040 // +build rp2040 package machine diff --git a/src/machine/machine_rp2040_i2c.go b/src/machine/machine_rp2040_i2c.go index efbb62a4f..f4d9d4700 100644 --- a/src/machine/machine_rp2040_i2c.go +++ b/src/machine/machine_rp2040_i2c.go @@ -1,3 +1,4 @@ +//go:build rp2040 // +build rp2040 package machine diff --git a/src/machine/machine_rp2040_pll.go b/src/machine/machine_rp2040_pll.go index 275aa25f1..d716566b8 100644 --- a/src/machine/machine_rp2040_pll.go +++ b/src/machine/machine_rp2040_pll.go @@ -1,3 +1,4 @@ +//go:build rp2040 // +build rp2040 package machine diff --git a/src/machine/machine_rp2040_resets.go b/src/machine/machine_rp2040_resets.go index 39c834505..1a6ad99e5 100644 --- a/src/machine/machine_rp2040_resets.go +++ b/src/machine/machine_rp2040_resets.go @@ -1,3 +1,4 @@ +//go:build rp2040 // +build rp2040 package machine diff --git a/src/machine/machine_rp2040_spi.go b/src/machine/machine_rp2040_spi.go index ac2bcabe6..8e5525413 100644 --- a/src/machine/machine_rp2040_spi.go +++ b/src/machine/machine_rp2040_spi.go @@ -1,3 +1,4 @@ +//go:build rp2040 // +build rp2040 package machine diff --git a/src/machine/machine_rp2040_timer.go b/src/machine/machine_rp2040_timer.go index e714a1915..1ebe2130c 100644 --- a/src/machine/machine_rp2040_timer.go +++ b/src/machine/machine_rp2040_timer.go @@ -1,3 +1,4 @@ +//go:build rp2040 // +build rp2040 package machine diff --git a/src/machine/machine_rp2040_uart.go b/src/machine/machine_rp2040_uart.go index e2b5f7337..7dd822cf9 100644 --- a/src/machine/machine_rp2040_uart.go +++ b/src/machine/machine_rp2040_uart.go @@ -1,3 +1,4 @@ +//go:build rp2040 // +build rp2040 package machine diff --git a/src/machine/machine_rp2040_watchdog.go b/src/machine/machine_rp2040_watchdog.go index b55bbc671..e2dc196fc 100644 --- a/src/machine/machine_rp2040_watchdog.go +++ b/src/machine/machine_rp2040_watchdog.go @@ -1,3 +1,4 @@ +//go:build rp2040 // +build rp2040 package machine diff --git a/src/machine/machine_rp2040_xosc.go b/src/machine/machine_rp2040_xosc.go index 357853948..f670de40c 100644 --- a/src/machine/machine_rp2040_xosc.go +++ b/src/machine/machine_rp2040_xosc.go @@ -1,3 +1,4 @@ +//go:build rp2040 // +build rp2040 package machine diff --git a/src/machine/machine_stm32.go b/src/machine/machine_stm32.go index 1f92b1957..a5d4b3827 100644 --- a/src/machine/machine_stm32.go +++ b/src/machine/machine_stm32.go @@ -1,3 +1,4 @@ +//go:build stm32 // +build stm32 package machine diff --git a/src/machine/machine_stm32_exti_afio.go b/src/machine/machine_stm32_exti_afio.go index aee4936ac..0cf34003b 100644 --- a/src/machine/machine_stm32_exti_afio.go +++ b/src/machine/machine_stm32_exti_afio.go @@ -1,3 +1,4 @@ +//go:build stm32f1 // +build stm32f1 package machine diff --git a/src/machine/machine_stm32_exti_exti.go b/src/machine/machine_stm32_exti_exti.go index 73db5e1e4..e21cfae56 100644 --- a/src/machine/machine_stm32_exti_exti.go +++ b/src/machine/machine_stm32_exti_exti.go @@ -1,3 +1,4 @@ +//go:build stm32l5 // +build stm32l5 package machine diff --git a/src/machine/machine_stm32_i2c_reva.go b/src/machine/machine_stm32_i2c_reva.go index 4d7e2190d..eee4e155d 100644 --- a/src/machine/machine_stm32_i2c_reva.go +++ b/src/machine/machine_stm32_i2c_reva.go @@ -1,3 +1,4 @@ +//go:build stm32f4 || stm32f1 // +build stm32f4 stm32f1 package machine diff --git a/src/machine/machine_stm32_tim.go b/src/machine/machine_stm32_tim.go index 41e4fb0f8..02c6c7a16 100644 --- a/src/machine/machine_stm32_tim.go +++ b/src/machine/machine_stm32_tim.go @@ -1,3 +1,4 @@ +//go:build stm32 // +build stm32 package machine diff --git a/src/machine/machine_stm32_tim_moder.go b/src/machine/machine_stm32_tim_moder.go index e1c359bae..e868469f4 100644 --- a/src/machine/machine_stm32_tim_moder.go +++ b/src/machine/machine_stm32_tim_moder.go @@ -1,3 +1,4 @@ +//go:build stm32 && !stm32f1 // +build stm32,!stm32f1 package machine diff --git a/src/machine/machine_stm32_uart.go b/src/machine/machine_stm32_uart.go index 62f7cb192..9fdd17cb0 100644 --- a/src/machine/machine_stm32_uart.go +++ b/src/machine/machine_stm32_uart.go @@ -1,3 +1,4 @@ +//go:build stm32 // +build stm32 package machine diff --git a/src/machine/machine_stm32f103.go b/src/machine/machine_stm32f103.go index 0e21c455d..4c6778023 100644 --- a/src/machine/machine_stm32f103.go +++ b/src/machine/machine_stm32f103.go @@ -1,3 +1,4 @@ +//go:build stm32 && stm32f103 // +build stm32,stm32f103 package machine diff --git a/src/machine/machine_stm32f7x2.go b/src/machine/machine_stm32f7x2.go index 7035c38c5..bdfa27bc1 100644 --- a/src/machine/machine_stm32f7x2.go +++ b/src/machine/machine_stm32f7x2.go @@ -1,3 +1,4 @@ +//go:build stm32f7x2 // +build stm32f7x2 package machine diff --git a/src/machine/machine_stm32l0x1.go b/src/machine/machine_stm32l0x1.go index 033718c57..254fb36cc 100644 --- a/src/machine/machine_stm32l0x1.go +++ b/src/machine/machine_stm32l0x1.go @@ -1,3 +1,4 @@ +//go:build stm32l0x1 // +build stm32l0x1 package machine diff --git a/src/machine/machine_stm32l5x2.go b/src/machine/machine_stm32l5x2.go index fc81b2747..966c0cebc 100644 --- a/src/machine/machine_stm32l5x2.go +++ b/src/machine/machine_stm32l5x2.go @@ -1,3 +1,4 @@ +//go:build stm32l5x2 // +build stm32l5x2 package machine diff --git a/src/machine/serial-none.go b/src/machine/serial-none.go index 22e94cc90..3596769f4 100644 --- a/src/machine/serial-none.go +++ b/src/machine/serial-none.go @@ -1,3 +1,4 @@ +//go:build baremetal && serial.none // +build baremetal,serial.none package machine diff --git a/src/machine/serial-uart.go b/src/machine/serial-uart.go index d3edf832f..30575502d 100644 --- a/src/machine/serial-uart.go +++ b/src/machine/serial-uart.go @@ -1,3 +1,4 @@ +//go:build baremetal && serial.uart // +build baremetal,serial.uart package machine diff --git a/src/machine/serial-usb.go b/src/machine/serial-usb.go index 476d4b0cf..ac484f87a 100644 --- a/src/machine/serial-usb.go +++ b/src/machine/serial-usb.go @@ -1,3 +1,4 @@ +//go:build baremetal && serial.usb // +build baremetal,serial.usb package machine diff --git a/src/machine/uart.go b/src/machine/uart.go index 8fbac8711..ccfc64ee7 100644 --- a/src/machine/uart.go +++ b/src/machine/uart.go @@ -1,3 +1,4 @@ +//go:build atmega || esp || nrf || sam || sifive || stm32 || k210 || nxp || rp2040 // +build atmega esp nrf sam sifive stm32 k210 nxp rp2040 package machine diff --git a/src/machine/usb.go b/src/machine/usb.go index 4bea1880d..1789e170a 100644 --- a/src/machine/usb.go +++ b/src/machine/usb.go @@ -1,3 +1,4 @@ +//go:build sam || nrf52840 // +build sam nrf52840 package machine diff --git a/src/os/dir.go b/src/os/dir.go index 72bd2c264..f3ad9f691 100644 --- a/src/os/dir.go +++ b/src/os/dir.go @@ -1,3 +1,4 @@ +//go:build go1.16 // +build go1.16 // Copyright 2016 The Go Authors. All rights reserved. diff --git a/src/os/dir_other.go b/src/os/dir_other.go index fea6fe06d..0451d7dcf 100644 --- a/src/os/dir_other.go +++ b/src/os/dir_other.go @@ -1,3 +1,4 @@ +//go:build (go1.16 && baremetal) || (go1.16 && js) || (go1.16 && wasi) || (go1.16 && windows) // +build go1.16,baremetal go1.16,js go1.16,wasi go1.16,windows // Copyright 2009 The Go Authors. All rights reserved. diff --git a/src/os/dir_other_go115.go b/src/os/dir_other_go115.go index 8bc4036d5..028b5b994 100644 --- a/src/os/dir_other_go115.go +++ b/src/os/dir_other_go115.go @@ -1,3 +1,4 @@ +//go:build !go1.16 // +build !go1.16 // Copyright 2009 The Go Authors. All rights reserved. diff --git a/src/os/dir_test.go b/src/os/dir_test.go index 9ff799cac..f088861c2 100644 --- a/src/os/dir_test.go +++ b/src/os/dir_test.go @@ -1,3 +1,4 @@ +//go:build darwin || (linux && !baremetal && !js && !wasi && !386 && !arm) // +build darwin linux,!baremetal,!js,!wasi,!386,!arm package os_test diff --git a/src/os/dir_unix.go b/src/os/dir_unix.go index 9bcecb37b..659b612bb 100644 --- a/src/os/dir_unix.go +++ b/src/os/dir_unix.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build linux && !baremetal && !wasi // +build linux,!baremetal,!wasi package os diff --git a/src/os/dirent_linux.go b/src/os/dirent_linux.go index 564703e82..c249f615a 100644 --- a/src/os/dirent_linux.go +++ b/src/os/dirent_linux.go @@ -1,3 +1,4 @@ +//go:build !baremetal && !js && !wasi // +build !baremetal,!js,!wasi // Copyright 2020 The Go Authors. All rights reserved. diff --git a/src/os/env_unix_test.go b/src/os/env_unix_test.go index 9a4ec6fcb..d567acf1e 100644 --- a/src/os/env_unix_test.go +++ b/src/os/env_unix_test.go @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//+build darwin linux +//go:build darwin || linux +// +build darwin linux package os_test diff --git a/src/os/executable_other.go b/src/os/executable_other.go index 0c9974f9c..4bf1f0423 100644 --- a/src/os/executable_other.go +++ b/src/os/executable_other.go @@ -1,3 +1,4 @@ +//go:build !linux || baremetal // +build !linux baremetal package os diff --git a/src/os/executable_procfs.go b/src/os/executable_procfs.go index 1abe6f1a0..cabe3744f 100644 --- a/src/os/executable_procfs.go +++ b/src/os/executable_procfs.go @@ -4,6 +4,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build linux && !baremetal // +build linux,!baremetal package os diff --git a/src/os/file_anyos_test.go b/src/os/file_anyos_test.go index 51dac61df..6d5defca7 100644 --- a/src/os/file_anyos_test.go +++ b/src/os/file_anyos_test.go @@ -1,3 +1,4 @@ +//go:build !baremetal && !js // +build !baremetal,!js package os_test diff --git a/src/os/file_go_116.go b/src/os/file_go_116.go index 4b59e2022..e383392ae 100644 --- a/src/os/file_go_116.go +++ b/src/os/file_go_116.go @@ -1,3 +1,4 @@ +//go:build go1.16 // +build go1.16 package os diff --git a/src/os/file_go_116_test.go b/src/os/file_go_116_test.go index fa582e21b..c218a02d6 100644 --- a/src/os/file_go_116_test.go +++ b/src/os/file_go_116_test.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build go1.16 && !baremetal && !js && !wasi // +build go1.16,!baremetal,!js,!wasi // DirFS tests copied verbatim from upstream os_test.go, and adjusted minimally to fit tinygo. diff --git a/src/os/file_other.go b/src/os/file_other.go index b97d249d6..7963c50aa 100644 --- a/src/os/file_other.go +++ b/src/os/file_other.go @@ -1,3 +1,4 @@ +//go:build baremetal || (wasm && !wasi) // +build baremetal wasm,!wasi package os diff --git a/src/os/file_unix.go b/src/os/file_unix.go index 76cc3ca72..6bca8ed91 100644 --- a/src/os/file_unix.go +++ b/src/os/file_unix.go @@ -1,3 +1,4 @@ +//go:build darwin || (linux && !baremetal) // +build darwin linux,!baremetal // Portions copyright 2009 The Go Authors. All rights reserved. diff --git a/src/os/os_anyos_test.go b/src/os/os_anyos_test.go index ed0d9dafd..0002f072c 100644 --- a/src/os/os_anyos_test.go +++ b/src/os/os_anyos_test.go @@ -1,3 +1,4 @@ +//go:build windows || darwin || (linux && !baremetal) // +build windows darwin linux,!baremetal package os_test diff --git a/src/os/os_chmod_test.go b/src/os/os_chmod_test.go index b4207c2a3..01ec7f662 100644 --- a/src/os/os_chmod_test.go +++ b/src/os/os_chmod_test.go @@ -1,3 +1,4 @@ +//go:build !baremetal && !js && !wasi // +build !baremetal,!js,!wasi // Copyright 2009 The Go Authors. All rights reserved. diff --git a/src/os/os_symlink_test.go b/src/os/os_symlink_test.go index ad74e5dd7..dd9747971 100644 --- a/src/os/os_symlink_test.go +++ b/src/os/os_symlink_test.go @@ -1,3 +1,4 @@ +//go:build !windows && !baremetal && !js && !wasi // +build !windows,!baremetal,!js,!wasi // Copyright 2009 The Go Authors. All rights reserved. diff --git a/src/os/path.go b/src/os/path.go index 65800e98e..3cdc91a00 100644 --- a/src/os/path.go +++ b/src/os/path.go @@ -1,3 +1,4 @@ +//go:build !baremetal && !js // +build !baremetal,!js // Copyright 2009 The Go Authors. All rights reserved. diff --git a/src/os/seek_unix_bad.go b/src/os/seek_unix_bad.go index a242950ca..13f1d98c2 100644 --- a/src/os/seek_unix_bad.go +++ b/src/os/seek_unix_bad.go @@ -1,3 +1,4 @@ +//go:build (linux && !baremetal && 386) || (linux && !baremetal && arm && !wasi) // +build linux,!baremetal,386 linux,!baremetal,arm,!wasi package os diff --git a/src/os/stat_linux.go b/src/os/stat_linux.go index c4164f70d..d186926ab 100644 --- a/src/os/stat_linux.go +++ b/src/os/stat_linux.go @@ -1,3 +1,4 @@ +//go:build linux && !baremetal // +build linux,!baremetal // Copyright 2009 The Go Authors. All rights reserved. diff --git a/src/os/stat_other.go b/src/os/stat_other.go index 53555cef6..5b574abba 100644 --- a/src/os/stat_other.go +++ b/src/os/stat_other.go @@ -1,4 +1,5 @@ -// +build baremetal wasm,!wasi +//go:build baremetal || (wasm && !wasi) +// +build baremetal wasm,!wasi // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/src/os/stat_unix.go b/src/os/stat_unix.go index 02e3e1aa9..68f0168b7 100644 --- a/src/os/stat_unix.go +++ b/src/os/stat_unix.go @@ -1,3 +1,4 @@ +//go:build darwin || (linux && !baremetal) // +build darwin linux,!baremetal // Copyright 2016 The Go Authors. All rights reserved. diff --git a/src/os/types_anyos.go b/src/os/types_anyos.go index 4cf02ff3b..bc404f359 100644 --- a/src/os/types_anyos.go +++ b/src/os/types_anyos.go @@ -1,3 +1,4 @@ +//go:build !baremetal && !js // +build !baremetal,!js // Copyright 2009 The Go Authors. All rights reserved. diff --git a/src/os/types_unix.go b/src/os/types_unix.go index 5e345b552..095fabda7 100644 --- a/src/os/types_unix.go +++ b/src/os/types_unix.go @@ -1,3 +1,4 @@ +//go:build darwin || (linux && !baremetal) // +build darwin linux,!baremetal // Copyright 2009 The Go Authors. All rights reserved. diff --git a/src/runtime/arch_arm.go b/src/runtime/arch_arm.go index 925b7b738..679840f40 100644 --- a/src/runtime/arch_arm.go +++ b/src/runtime/arch_arm.go @@ -1,3 +1,4 @@ +//go:build (arm && !baremetal && !tinygo.wasm) || (arm && arm7tdmi) // +build arm,!baremetal,!tinygo.wasm arm,arm7tdmi package runtime diff --git a/src/runtime/arch_tinygoriscv32.go b/src/runtime/arch_tinygoriscv32.go index dcae76047..046006aa4 100644 --- a/src/runtime/arch_tinygoriscv32.go +++ b/src/runtime/arch_tinygoriscv32.go @@ -1,3 +1,4 @@ +//go:build tinygo.riscv32 // +build tinygo.riscv32 package runtime diff --git a/src/runtime/arch_tinygoriscv64.go b/src/runtime/arch_tinygoriscv64.go index a4a8c14f0..71410e6e4 100644 --- a/src/runtime/arch_tinygoriscv64.go +++ b/src/runtime/arch_tinygoriscv64.go @@ -1,3 +1,4 @@ +//go:build tinygo.riscv64 // +build tinygo.riscv64 package runtime diff --git a/src/runtime/arch_tinygowasm.go b/src/runtime/arch_tinygowasm.go index a84d4c449..e370b6296 100644 --- a/src/runtime/arch_tinygowasm.go +++ b/src/runtime/arch_tinygowasm.go @@ -1,3 +1,4 @@ +//go:build tinygo.wasm // +build tinygo.wasm package runtime diff --git a/src/runtime/arch_xtensa.go b/src/runtime/arch_xtensa.go index 6e6a5a354..c9598922b 100644 --- a/src/runtime/arch_xtensa.go +++ b/src/runtime/arch_xtensa.go @@ -1,3 +1,4 @@ +//go:build xtensa // +build xtensa package runtime diff --git a/src/runtime/baremetal.go b/src/runtime/baremetal.go index e17edcbfa..b91fdb290 100644 --- a/src/runtime/baremetal.go +++ b/src/runtime/baremetal.go @@ -1,3 +1,4 @@ +//go:build baremetal // +build baremetal package runtime diff --git a/src/runtime/cond.go b/src/runtime/cond.go index 76d3a377b..e382adb8b 100644 --- a/src/runtime/cond.go +++ b/src/runtime/cond.go @@ -1,3 +1,4 @@ +//go:build !scheduler.none // +build !scheduler.none package runtime diff --git a/src/runtime/cond_nosched.go b/src/runtime/cond_nosched.go index 585b76935..f999a56c6 100644 --- a/src/runtime/cond_nosched.go +++ b/src/runtime/cond_nosched.go @@ -1,3 +1,4 @@ +//go:build scheduler.none // +build scheduler.none package runtime diff --git a/src/runtime/env_linux.go b/src/runtime/env_linux.go index 5d2164e10..2d0a7ea56 100644 --- a/src/runtime/env_linux.go +++ b/src/runtime/env_linux.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package runtime diff --git a/src/runtime/gc_leaking.go b/src/runtime/gc_leaking.go index 47b7d4faa..b2abfd0c8 100644 --- a/src/runtime/gc_leaking.go +++ b/src/runtime/gc_leaking.go @@ -1,3 +1,4 @@ +//go:build gc.leaking // +build gc.leaking package runtime diff --git a/src/runtime/gc_none.go b/src/runtime/gc_none.go index f769a07fa..fc7910080 100644 --- a/src/runtime/gc_none.go +++ b/src/runtime/gc_none.go @@ -1,3 +1,4 @@ +//go:build gc.none // +build gc.none package runtime diff --git a/src/runtime/hosted.go b/src/runtime/hosted.go index 935885de1..72eb11497 100644 --- a/src/runtime/hosted.go +++ b/src/runtime/hosted.go @@ -1,3 +1,4 @@ +//go:build !baremetal // +build !baremetal package runtime diff --git a/src/runtime/interrupt/interrupt_avr.go b/src/runtime/interrupt/interrupt_avr.go index 6eb6b28fa..295757838 100644 --- a/src/runtime/interrupt/interrupt_avr.go +++ b/src/runtime/interrupt/interrupt_avr.go @@ -1,3 +1,4 @@ +//go:build avr // +build avr package interrupt diff --git a/src/runtime/interrupt/interrupt_cortexm.go b/src/runtime/interrupt/interrupt_cortexm.go index 0653cb69a..131e9ede1 100644 --- a/src/runtime/interrupt/interrupt_cortexm.go +++ b/src/runtime/interrupt/interrupt_cortexm.go @@ -1,3 +1,4 @@ +//go:build cortexm // +build cortexm package interrupt diff --git a/src/runtime/interrupt/interrupt_esp32c3.go b/src/runtime/interrupt/interrupt_esp32c3.go index a37814888..6a1e32911 100644 --- a/src/runtime/interrupt/interrupt_esp32c3.go +++ b/src/runtime/interrupt/interrupt_esp32c3.go @@ -1,3 +1,4 @@ +//go:build esp32c3 // +build esp32c3 package interrupt diff --git a/src/runtime/interrupt/interrupt_gameboyadvance.go b/src/runtime/interrupt/interrupt_gameboyadvance.go index b0055070b..0437f9edb 100644 --- a/src/runtime/interrupt/interrupt_gameboyadvance.go +++ b/src/runtime/interrupt/interrupt_gameboyadvance.go @@ -1,3 +1,4 @@ +//go:build gameboyadvance // +build gameboyadvance package interrupt diff --git a/src/runtime/interrupt/interrupt_k210.go b/src/runtime/interrupt/interrupt_k210.go index 31e056c16..4f987171c 100644 --- a/src/runtime/interrupt/interrupt_k210.go +++ b/src/runtime/interrupt/interrupt_k210.go @@ -1,3 +1,4 @@ +//go:build k210 // +build k210 package interrupt diff --git a/src/runtime/interrupt/interrupt_none.go b/src/runtime/interrupt/interrupt_none.go index 89109304a..136d35709 100644 --- a/src/runtime/interrupt/interrupt_none.go +++ b/src/runtime/interrupt/interrupt_none.go @@ -1,3 +1,4 @@ +//go:build !baremetal // +build !baremetal package interrupt diff --git a/src/runtime/interrupt/interrupt_sifive.go b/src/runtime/interrupt/interrupt_sifive.go index 1af18ec2a..4be3ee6a3 100644 --- a/src/runtime/interrupt/interrupt_sifive.go +++ b/src/runtime/interrupt/interrupt_sifive.go @@ -1,3 +1,4 @@ +//go:build sifive // +build sifive package interrupt diff --git a/src/runtime/interrupt/interrupt_tinygoriscv.go b/src/runtime/interrupt/interrupt_tinygoriscv.go index 0161018da..da2964195 100644 --- a/src/runtime/interrupt/interrupt_tinygoriscv.go +++ b/src/runtime/interrupt/interrupt_tinygoriscv.go @@ -1,3 +1,4 @@ +//go:build tinygo.riscv // +build tinygo.riscv package interrupt diff --git a/src/runtime/interrupt/interrupt_xtensa.go b/src/runtime/interrupt/interrupt_xtensa.go index dfcbc7dbd..67f4d812a 100644 --- a/src/runtime/interrupt/interrupt_xtensa.go +++ b/src/runtime/interrupt/interrupt_xtensa.go @@ -1,3 +1,4 @@ +//go:build xtensa // +build xtensa package interrupt diff --git a/src/runtime/mstats.go b/src/runtime/mstats.go index d2723fe93..38596dce3 100644 --- a/src/runtime/mstats.go +++ b/src/runtime/mstats.go @@ -1,3 +1,4 @@ +//go:build gc.conservative // +build gc.conservative package runtime diff --git a/src/runtime/nonhosted.go b/src/runtime/nonhosted.go index 531c1c1e1..010b7c4cd 100644 --- a/src/runtime/nonhosted.go +++ b/src/runtime/nonhosted.go @@ -1,3 +1,4 @@ +//go:build baremetal || js // +build baremetal js package runtime diff --git a/src/runtime/os_darwin.go b/src/runtime/os_darwin.go index be8789098..d485f042b 100644 --- a/src/runtime/os_darwin.go +++ b/src/runtime/os_darwin.go @@ -1,3 +1,4 @@ +//go:build darwin // +build darwin package runtime diff --git a/src/runtime/os_js.go b/src/runtime/os_js.go index 422b1d322..d4000108e 100644 --- a/src/runtime/os_js.go +++ b/src/runtime/os_js.go @@ -1,3 +1,4 @@ +//go:build js // +build js package runtime diff --git a/src/runtime/os_linux.go b/src/runtime/os_linux.go index aa056173b..2d5f5e64d 100644 --- a/src/runtime/os_linux.go +++ b/src/runtime/os_linux.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package runtime diff --git a/src/runtime/runtime_arm7tdmi.go b/src/runtime/runtime_arm7tdmi.go index 3b383c326..61b67264b 100644 --- a/src/runtime/runtime_arm7tdmi.go +++ b/src/runtime/runtime_arm7tdmi.go @@ -1,3 +1,4 @@ +//go:build arm7tdmi // +build arm7tdmi package runtime diff --git a/src/runtime/runtime_atmega.go b/src/runtime/runtime_atmega.go index 3c3d57bca..b62a50a00 100644 --- a/src/runtime/runtime_atmega.go +++ b/src/runtime/runtime_atmega.go @@ -1,3 +1,4 @@ +//go:build avr && atmega // +build avr,atmega package runtime diff --git a/src/runtime/runtime_atsamd21.go b/src/runtime/runtime_atsamd21.go index c4147c802..3f66ad2fa 100644 --- a/src/runtime/runtime_atsamd21.go +++ b/src/runtime/runtime_atsamd21.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd21 // +build sam,atsamd21 package runtime diff --git a/src/runtime/runtime_atsamd21e18.go b/src/runtime/runtime_atsamd21e18.go index 8127881f7..2ad6eae9c 100644 --- a/src/runtime/runtime_atsamd21e18.go +++ b/src/runtime/runtime_atsamd21e18.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd21 && atsamd21e18 // +build sam,atsamd21,atsamd21e18 package runtime diff --git a/src/runtime/runtime_atsamd21g18.go b/src/runtime/runtime_atsamd21g18.go index 8c2cf4162..469387348 100644 --- a/src/runtime/runtime_atsamd21g18.go +++ b/src/runtime/runtime_atsamd21g18.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd21 && atsamd21g18 // +build sam,atsamd21,atsamd21g18 package runtime diff --git a/src/runtime/runtime_atsamd51.go b/src/runtime/runtime_atsamd51.go index 3561050bf..ed2aa9c3d 100644 --- a/src/runtime/runtime_atsamd51.go +++ b/src/runtime/runtime_atsamd51.go @@ -1,3 +1,4 @@ +//go:build (sam && atsamd51) || (sam && atsame5x) // +build sam,atsamd51 sam,atsame5x package runtime diff --git a/src/runtime/runtime_atsamd51g19.go b/src/runtime/runtime_atsamd51g19.go index 636c6dcd4..c8aed7170 100644 --- a/src/runtime/runtime_atsamd51g19.go +++ b/src/runtime/runtime_atsamd51g19.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd51 && atsamd51g19 // +build sam,atsamd51,atsamd51g19 package runtime diff --git a/src/runtime/runtime_atsamd51j19.go b/src/runtime/runtime_atsamd51j19.go index 94e4742e6..b3e1db0f1 100644 --- a/src/runtime/runtime_atsamd51j19.go +++ b/src/runtime/runtime_atsamd51j19.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd51 && atsamd51j19 // +build sam,atsamd51,atsamd51j19 package runtime diff --git a/src/runtime/runtime_atsamd51j20.go b/src/runtime/runtime_atsamd51j20.go index a068a08c2..af50349e3 100644 --- a/src/runtime/runtime_atsamd51j20.go +++ b/src/runtime/runtime_atsamd51j20.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd51 && atsamd51j20 // +build sam,atsamd51,atsamd51j20 package runtime diff --git a/src/runtime/runtime_atsamd51p19.go b/src/runtime/runtime_atsamd51p19.go index 43078cb49..07c220fcc 100644 --- a/src/runtime/runtime_atsamd51p19.go +++ b/src/runtime/runtime_atsamd51p19.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd51 && atsamd51p19 // +build sam,atsamd51,atsamd51p19 package runtime diff --git a/src/runtime/runtime_atsamd51p20.go b/src/runtime/runtime_atsamd51p20.go index 2fb38e79f..835621016 100644 --- a/src/runtime/runtime_atsamd51p20.go +++ b/src/runtime/runtime_atsamd51p20.go @@ -1,3 +1,4 @@ +//go:build sam && atsamd51 && atsamd51p20 // +build sam,atsamd51,atsamd51p20 package runtime diff --git a/src/runtime/runtime_atsame51j19.go b/src/runtime/runtime_atsame51j19.go index 76dce7332..907b95be2 100644 --- a/src/runtime/runtime_atsame51j19.go +++ b/src/runtime/runtime_atsame51j19.go @@ -1,3 +1,4 @@ +//go:build sam && atsame51 && atsame51j19 // +build sam,atsame51,atsame51j19 package runtime diff --git a/src/runtime/runtime_atsame54p20.go b/src/runtime/runtime_atsame54p20.go index 7c2981acd..34a281533 100644 --- a/src/runtime/runtime_atsame54p20.go +++ b/src/runtime/runtime_atsame54p20.go @@ -1,3 +1,4 @@ +//go:build sam && atsame5x && atsame54p20 // +build sam,atsame5x,atsame54p20 package runtime diff --git a/src/runtime/runtime_atsame5x_can.go b/src/runtime/runtime_atsame5x_can.go index db778b0a1..dc1fc2ab8 100644 --- a/src/runtime/runtime_atsame5x_can.go +++ b/src/runtime/runtime_atsame5x_can.go @@ -1,3 +1,4 @@ +//go:build (sam && atsame51) || (sam && atsame54) // +build sam,atsame51 sam,atsame54 package runtime diff --git a/src/runtime/runtime_attiny.go b/src/runtime/runtime_attiny.go index 9f783937d..7683fcac0 100644 --- a/src/runtime/runtime_attiny.go +++ b/src/runtime/runtime_attiny.go @@ -1,3 +1,4 @@ +//go:build avr && attiny // +build avr,attiny package runtime diff --git a/src/runtime/runtime_cortexm.go b/src/runtime/runtime_cortexm.go index ae20f7dec..e718344fa 100644 --- a/src/runtime/runtime_cortexm.go +++ b/src/runtime/runtime_cortexm.go @@ -1,3 +1,4 @@ +//go:build cortexm // +build cortexm package runtime diff --git a/src/runtime/runtime_cortexm_abort.go b/src/runtime/runtime_cortexm_abort.go index 861d330a0..584c0c22c 100644 --- a/src/runtime/runtime_cortexm_abort.go +++ b/src/runtime/runtime_cortexm_abort.go @@ -1,3 +1,4 @@ +//go:build cortexm && !nxp && !qemu // +build cortexm,!nxp,!qemu package runtime diff --git a/src/runtime/runtime_cortexm_hardfault.go b/src/runtime/runtime_cortexm_hardfault.go index 7d1969f1b..8c56bbd9e 100644 --- a/src/runtime/runtime_cortexm_hardfault.go +++ b/src/runtime/runtime_cortexm_hardfault.go @@ -1,3 +1,4 @@ +//go:build atsamd21 || nrf51 // +build atsamd21 nrf51 package runtime diff --git a/src/runtime/runtime_cortexm_hardfault_debug.go b/src/runtime/runtime_cortexm_hardfault_debug.go index f136d7102..ee5e97eac 100644 --- a/src/runtime/runtime_cortexm_hardfault_debug.go +++ b/src/runtime/runtime_cortexm_hardfault_debug.go @@ -1,3 +1,4 @@ +//go:build cortexm && !atsamd21 && !nrf51 // +build cortexm,!atsamd21,!nrf51 package runtime diff --git a/src/runtime/runtime_cortexm_qemu.go b/src/runtime/runtime_cortexm_qemu.go index 07eef7065..5f37b062f 100644 --- a/src/runtime/runtime_cortexm_qemu.go +++ b/src/runtime/runtime_cortexm_qemu.go @@ -1,3 +1,4 @@ +//go:build cortexm && qemu // +build cortexm,qemu package runtime diff --git a/src/runtime/runtime_esp32.go b/src/runtime/runtime_esp32.go index 7855e2d65..96d86af6c 100644 --- a/src/runtime/runtime_esp32.go +++ b/src/runtime/runtime_esp32.go @@ -1,3 +1,4 @@ +//go:build esp32 // +build esp32 package runtime diff --git a/src/runtime/runtime_esp32c3.go b/src/runtime/runtime_esp32c3.go index 38c9ac2ca..fd0107c92 100644 --- a/src/runtime/runtime_esp32c3.go +++ b/src/runtime/runtime_esp32c3.go @@ -1,3 +1,4 @@ +//go:build esp32c3 // +build esp32c3 package runtime diff --git a/src/runtime/runtime_esp32xx.go b/src/runtime/runtime_esp32xx.go index b3270ac39..79507a51c 100644 --- a/src/runtime/runtime_esp32xx.go +++ b/src/runtime/runtime_esp32xx.go @@ -1,3 +1,4 @@ +//go:build esp32 || esp32c3 // +build esp32 esp32c3 package runtime diff --git a/src/runtime/runtime_esp8266.go b/src/runtime/runtime_esp8266.go index 936b99a4e..7ec75c82e 100644 --- a/src/runtime/runtime_esp8266.go +++ b/src/runtime/runtime_esp8266.go @@ -1,3 +1,4 @@ +//go:build esp8266 // +build esp8266 package runtime diff --git a/src/runtime/runtime_fe310.go b/src/runtime/runtime_fe310.go index c09dfe81c..5999396b1 100644 --- a/src/runtime/runtime_fe310.go +++ b/src/runtime/runtime_fe310.go @@ -1,3 +1,4 @@ +//go:build fe310 // +build fe310 // This file implements target-specific things for the FE310 chip as used in the diff --git a/src/runtime/runtime_fe310_baremetal.go b/src/runtime/runtime_fe310_baremetal.go index 7750e7bb0..5c393740e 100644 --- a/src/runtime/runtime_fe310_baremetal.go +++ b/src/runtime/runtime_fe310_baremetal.go @@ -1,3 +1,4 @@ +//go:build fe310 && !qemu // +build fe310,!qemu package runtime diff --git a/src/runtime/runtime_fe310_qemu.go b/src/runtime/runtime_fe310_qemu.go index 98614736c..42ba0c313 100644 --- a/src/runtime/runtime_fe310_qemu.go +++ b/src/runtime/runtime_fe310_qemu.go @@ -1,3 +1,4 @@ +//go:build fe310 && qemu // +build fe310,qemu package runtime diff --git a/src/runtime/runtime_k210.go b/src/runtime/runtime_k210.go index 2fb4fec65..6cdea759c 100644 --- a/src/runtime/runtime_k210.go +++ b/src/runtime/runtime_k210.go @@ -1,3 +1,4 @@ +//go:build k210 // +build k210 // This file implements target-specific things for the K210 chip as used in the diff --git a/src/runtime/runtime_k210_baremetal.go b/src/runtime/runtime_k210_baremetal.go index 2b4f46ccf..160d64116 100644 --- a/src/runtime/runtime_k210_baremetal.go +++ b/src/runtime/runtime_k210_baremetal.go @@ -1,3 +1,4 @@ +//go:build k210 && !qemu // +build k210,!qemu package runtime diff --git a/src/runtime/runtime_mimxrt1062.go b/src/runtime/runtime_mimxrt1062.go index 8a9f2b01b..abd95f4d0 100644 --- a/src/runtime/runtime_mimxrt1062.go +++ b/src/runtime/runtime_mimxrt1062.go @@ -1,3 +1,4 @@ +//go:build mimxrt1062 // +build mimxrt1062 package runtime diff --git a/src/runtime/runtime_mimxrt1062_clock.go b/src/runtime/runtime_mimxrt1062_clock.go index 3a5761986..9dcca934f 100644 --- a/src/runtime/runtime_mimxrt1062_clock.go +++ b/src/runtime/runtime_mimxrt1062_clock.go @@ -1,3 +1,4 @@ +//go:build mimxrt1062 // +build mimxrt1062 package runtime diff --git a/src/runtime/runtime_mimxrt1062_mpu.go b/src/runtime/runtime_mimxrt1062_mpu.go index cd71dd842..1ceb98424 100644 --- a/src/runtime/runtime_mimxrt1062_mpu.go +++ b/src/runtime/runtime_mimxrt1062_mpu.go @@ -1,3 +1,4 @@ +//go:build mimxrt1062 // +build mimxrt1062 package runtime diff --git a/src/runtime/runtime_mimxrt1062_time.go b/src/runtime/runtime_mimxrt1062_time.go index 22f29d179..9c4101be3 100644 --- a/src/runtime/runtime_mimxrt1062_time.go +++ b/src/runtime/runtime_mimxrt1062_time.go @@ -1,3 +1,4 @@ +//go:build mimxrt1062 // +build mimxrt1062 package runtime diff --git a/src/runtime/runtime_nintendoswitch.go b/src/runtime/runtime_nintendoswitch.go index 0267b5410..6433c6b6e 100644 --- a/src/runtime/runtime_nintendoswitch.go +++ b/src/runtime/runtime_nintendoswitch.go @@ -1,3 +1,4 @@ +//go:build nintendoswitch // +build nintendoswitch package runtime diff --git a/src/runtime/runtime_nrf.go b/src/runtime/runtime_nrf.go index dfbc76e10..9da4caf3d 100644 --- a/src/runtime/runtime_nrf.go +++ b/src/runtime/runtime_nrf.go @@ -1,3 +1,4 @@ +//go:build nrf // +build nrf package runtime diff --git a/src/runtime/runtime_nrf_bare.go b/src/runtime/runtime_nrf_bare.go index 973004104..51035e21c 100644 --- a/src/runtime/runtime_nrf_bare.go +++ b/src/runtime/runtime_nrf_bare.go @@ -1,3 +1,4 @@ +//go:build nrf && !softdevice // +build nrf,!softdevice package runtime diff --git a/src/runtime/runtime_nrf_softdevice.go b/src/runtime/runtime_nrf_softdevice.go index b1c970333..5da3776f3 100644 --- a/src/runtime/runtime_nrf_softdevice.go +++ b/src/runtime/runtime_nrf_softdevice.go @@ -1,3 +1,4 @@ +//go:build nrf && softdevice // +build nrf,softdevice package runtime diff --git a/src/runtime/runtime_nxpmk66f18.go b/src/runtime/runtime_nxpmk66f18.go index 02a9bb594..05643d71a 100644 --- a/src/runtime/runtime_nxpmk66f18.go +++ b/src/runtime/runtime_nxpmk66f18.go @@ -27,6 +27,7 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +//go:build nxp && mk66f18 // +build nxp,mk66f18 package runtime diff --git a/src/runtime/runtime_rp2040.go b/src/runtime/runtime_rp2040.go index 38f6d3041..1de9dd08e 100644 --- a/src/runtime/runtime_rp2040.go +++ b/src/runtime/runtime_rp2040.go @@ -1,3 +1,4 @@ +//go:build rp2040 // +build rp2040 package runtime diff --git a/src/runtime/runtime_stm32.go b/src/runtime/runtime_stm32.go index aabffa2ab..7fb332f99 100644 --- a/src/runtime/runtime_stm32.go +++ b/src/runtime/runtime_stm32.go @@ -1,3 +1,4 @@ +//go:build stm32 // +build stm32 package runtime diff --git a/src/runtime/runtime_stm32_timers.go b/src/runtime/runtime_stm32_timers.go index f181eed65..81b728f77 100644 --- a/src/runtime/runtime_stm32_timers.go +++ b/src/runtime/runtime_stm32_timers.go @@ -1,3 +1,4 @@ +//go:build stm32 // +build stm32 package runtime diff --git a/src/runtime/runtime_stm32f103.go b/src/runtime/runtime_stm32f103.go index 44e103bcd..c0cd7fa43 100644 --- a/src/runtime/runtime_stm32f103.go +++ b/src/runtime/runtime_stm32f103.go @@ -1,3 +1,4 @@ +//go:build stm32 && stm32f103 // +build stm32,stm32f103 package runtime diff --git a/src/runtime/runtime_stm32f405.go b/src/runtime/runtime_stm32f405.go index 26d19f792..ce8e9ef5a 100644 --- a/src/runtime/runtime_stm32f405.go +++ b/src/runtime/runtime_stm32f405.go @@ -1,3 +1,4 @@ +//go:build stm32f405 // +build stm32f405 package runtime diff --git a/src/runtime/runtime_stm32f7x2.go b/src/runtime/runtime_stm32f7x2.go index b29961978..29fe173c2 100644 --- a/src/runtime/runtime_stm32f7x2.go +++ b/src/runtime/runtime_stm32f7x2.go @@ -1,3 +1,4 @@ +//go:build stm32 && stm32f7x2 // +build stm32,stm32f7x2 package runtime diff --git a/src/runtime/runtime_stm32l0.go b/src/runtime/runtime_stm32l0.go index f6b66b3b7..bee860ab8 100644 --- a/src/runtime/runtime_stm32l0.go +++ b/src/runtime/runtime_stm32l0.go @@ -1,3 +1,4 @@ +//go:build stm32l0 // +build stm32l0 package runtime diff --git a/src/runtime/runtime_stm32l0x1.go b/src/runtime/runtime_stm32l0x1.go index 3fd5288e3..dfc30f4c5 100644 --- a/src/runtime/runtime_stm32l0x1.go +++ b/src/runtime/runtime_stm32l0x1.go @@ -1,3 +1,4 @@ +//go:build stm32l0x1 // +build stm32l0x1 package runtime diff --git a/src/runtime/runtime_stm32l0x2.go b/src/runtime/runtime_stm32l0x2.go index 89398ff51..4021e495f 100644 --- a/src/runtime/runtime_stm32l0x2.go +++ b/src/runtime/runtime_stm32l0x2.go @@ -1,3 +1,4 @@ +//go:build stm32l0x2 // +build stm32l0x2 package runtime diff --git a/src/runtime/runtime_stm32l5x2.go b/src/runtime/runtime_stm32l5x2.go index 88e45c277..73d0cc0b1 100644 --- a/src/runtime/runtime_stm32l5x2.go +++ b/src/runtime/runtime_stm32l5x2.go @@ -1,3 +1,4 @@ +//go:build stm32 && stm32l5x2 // +build stm32,stm32l5x2 package runtime diff --git a/src/runtime/runtime_tinygoriscv.go b/src/runtime/runtime_tinygoriscv.go index 857b93a72..1778749e1 100644 --- a/src/runtime/runtime_tinygoriscv.go +++ b/src/runtime/runtime_tinygoriscv.go @@ -1,3 +1,4 @@ +//go:build tinygo.riscv32 // +build tinygo.riscv32 package runtime diff --git a/src/runtime/runtime_tinygoriscv64.go b/src/runtime/runtime_tinygoriscv64.go index d995efce9..020dfc7ff 100644 --- a/src/runtime/runtime_tinygoriscv64.go +++ b/src/runtime/runtime_tinygoriscv64.go @@ -1,3 +1,4 @@ +//go:build tinygo.riscv64 // +build tinygo.riscv64 package runtime diff --git a/src/runtime/runtime_tinygoriscv_qemu.go b/src/runtime/runtime_tinygoriscv_qemu.go index 8558f41e8..18556e047 100644 --- a/src/runtime/runtime_tinygoriscv_qemu.go +++ b/src/runtime/runtime_tinygoriscv_qemu.go @@ -1,3 +1,4 @@ +//go:build tinygo.riscv && virt && qemu // +build tinygo.riscv,virt,qemu package runtime diff --git a/src/runtime/runtime_tinygowasm.go b/src/runtime/runtime_tinygowasm.go index a5b1b3c86..9e7d369ea 100644 --- a/src/runtime/runtime_tinygowasm.go +++ b/src/runtime/runtime_tinygowasm.go @@ -1,3 +1,4 @@ +//go:build tinygo.wasm // +build tinygo.wasm package runtime diff --git a/src/runtime/runtime_wasm_wasi.go b/src/runtime/runtime_wasm_wasi.go index 96174e801..658278626 100644 --- a/src/runtime/runtime_wasm_wasi.go +++ b/src/runtime/runtime_wasm_wasi.go @@ -1,3 +1,4 @@ +//go:build tinygo.wasm && wasi // +build tinygo.wasm,wasi package runtime diff --git a/src/runtime/scheduler_tasks.go b/src/runtime/scheduler_tasks.go index 03009b347..67b475496 100644 --- a/src/runtime/scheduler_tasks.go +++ b/src/runtime/scheduler_tasks.go @@ -1,3 +1,4 @@ +//go:build scheduler.tasks // +build scheduler.tasks package runtime diff --git a/src/runtime/time_nxpmk66f18.go b/src/runtime/time_nxpmk66f18.go index 3836fc39a..c0b876ed1 100644 --- a/src/runtime/time_nxpmk66f18.go +++ b/src/runtime/time_nxpmk66f18.go @@ -27,6 +27,7 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +//go:build nxp && mk66f18 // +build nxp,mk66f18 package runtime diff --git a/src/runtime/volatile/bitband_nxpmk66f18.go b/src/runtime/volatile/bitband_nxpmk66f18.go index 0a4904db2..b85a9495c 100644 --- a/src/runtime/volatile/bitband_nxpmk66f18.go +++ b/src/runtime/volatile/bitband_nxpmk66f18.go @@ -1,3 +1,4 @@ +//go:build nxp && mk66f18 // +build nxp,mk66f18 package volatile diff --git a/src/runtime/wait_other.go b/src/runtime/wait_other.go index 20f418d3d..1807a76eb 100644 --- a/src/runtime/wait_other.go +++ b/src/runtime/wait_other.go @@ -1,5 +1,5 @@ -// +build !tinygo.riscv -// +build !cortexm +//go:build !tinygo.riscv && !cortexm +// +build !tinygo.riscv,!cortexm package runtime diff --git a/src/syscall/errno_other.go b/src/syscall/errno_other.go index c18aa6cdb..3e9374b97 100644 --- a/src/syscall/errno_other.go +++ b/src/syscall/errno_other.go @@ -1,3 +1,4 @@ +//go:build !wasi && !darwin // +build !wasi,!darwin package syscall diff --git a/src/syscall/file_emulated.go b/src/syscall/file_emulated.go index 1fe1103b8..b1859bb1b 100644 --- a/src/syscall/file_emulated.go +++ b/src/syscall/file_emulated.go @@ -1,3 +1,4 @@ +//go:build baremetal || wasm // +build baremetal wasm // This file emulates some file-related functions that are only available diff --git a/src/syscall/file_hosted.go b/src/syscall/file_hosted.go index 45b657d18..f11081c31 100644 --- a/src/syscall/file_hosted.go +++ b/src/syscall/file_hosted.go @@ -1,3 +1,4 @@ +//go:build !baremetal && !wasm // +build !baremetal,!wasm // This file assumes there is a libc available that runs on a real operating diff --git a/src/syscall/proc_emulated.go b/src/syscall/proc_emulated.go index 89b22e818..4ed0b44c1 100644 --- a/src/syscall/proc_emulated.go +++ b/src/syscall/proc_emulated.go @@ -1,3 +1,4 @@ +//go:build baremetal || wasi || wasm // +build baremetal wasi wasm // This file emulates some process-related functions that are only available diff --git a/src/syscall/proc_hosted.go b/src/syscall/proc_hosted.go index 5f52a4ca8..2ec99ac54 100644 --- a/src/syscall/proc_hosted.go +++ b/src/syscall/proc_hosted.go @@ -1,3 +1,4 @@ +//go:build !baremetal && !wasi && !wasm // +build !baremetal,!wasi,!wasm // This file assumes there is a libc available that runs on a real operating diff --git a/src/syscall/syscall_libc.go b/src/syscall/syscall_libc.go index 496044f21..da46b9ffb 100644 --- a/src/syscall/syscall_libc.go +++ b/src/syscall/syscall_libc.go @@ -1,3 +1,4 @@ +//go:build darwin || nintendoswitch || wasi // +build darwin nintendoswitch wasi package syscall diff --git a/src/syscall/syscall_libc_darwin.go b/src/syscall/syscall_libc_darwin.go index 93201fc7e..ac89f74e5 100644 --- a/src/syscall/syscall_libc_darwin.go +++ b/src/syscall/syscall_libc_darwin.go @@ -1,3 +1,4 @@ +//go:build darwin // +build darwin package syscall diff --git a/src/syscall/syscall_libc_nintendoswitch.go b/src/syscall/syscall_libc_nintendoswitch.go index 2ff8de040..876f125c2 100644 --- a/src/syscall/syscall_libc_nintendoswitch.go +++ b/src/syscall/syscall_libc_nintendoswitch.go @@ -1,3 +1,4 @@ +//go:build nintendoswitch // +build nintendoswitch package syscall diff --git a/src/syscall/syscall_libc_wasi.go b/src/syscall/syscall_libc_wasi.go index ef3a7fa22..a19420d77 100644 --- a/src/syscall/syscall_libc_wasi.go +++ b/src/syscall/syscall_libc_wasi.go @@ -1,3 +1,4 @@ +//go:build wasi // +build wasi package syscall diff --git a/src/syscall/syscall_nonhosted.go b/src/syscall/syscall_nonhosted.go index be1b32c7b..2f590f2bd 100644 --- a/src/syscall/syscall_nonhosted.go +++ b/src/syscall/syscall_nonhosted.go @@ -1,3 +1,4 @@ +//go:build baremetal || js // +build baremetal js package syscall diff --git a/src/syscall/tables_nonhosted.go b/src/syscall/tables_nonhosted.go index a78eb75fb..ae0c7cc57 100644 --- a/src/syscall/tables_nonhosted.go +++ b/src/syscall/tables_nonhosted.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build baremetal || nintendoswitch || js // +build baremetal nintendoswitch js package syscall diff --git a/util_unix.go b/util_unix.go index 8be8eb2c0..47a3a2c3e 100644 --- a/util_unix.go +++ b/util_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package main