mirror of
https://github.com/golang/go
synced 2024-11-11 22:20:22 -07:00
syscall: add //go:build lines to files generated with with mksyscall_libc.pl
Change-Id: I2e02d02d9208fc2dbf01c0cea4a67c288967cd07 Reviewed-on: https://go-review.googlesource.com/c/go/+/315276 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
bb09f8a29b
commit
7eb2d30883
@ -23,6 +23,7 @@ my $cmdline = "mksyscall_libc.pl " . join(' ', @ARGV);
|
||||
my $errors = 0;
|
||||
my $_32bit = "";
|
||||
my $tags = ""; # build tags
|
||||
my $newtags = ""; # new style build tags
|
||||
my $aix = 0;
|
||||
my $solaris = 0;
|
||||
|
||||
@ -300,10 +301,14 @@ if($errors) {
|
||||
exit 1;
|
||||
}
|
||||
|
||||
# TODO: this assumes tags are just simply comma separated. For now this is all the uses.
|
||||
$newtags = $tags =~ s/,/ && /r;
|
||||
|
||||
print <<EOF;
|
||||
// $cmdline
|
||||
// Code generated by the command above; DO NOT EDIT.
|
||||
|
||||
//go:build $newtags
|
||||
// +build $tags
|
||||
|
||||
package $package
|
||||
|
Loading…
Reference in New Issue
Block a user