diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2021-05-01 15:37:44 +0200 |
---|---|---|
committer | Tobias Klauser <tobias.klauser@gmail.com> | 2021-05-02 21:24:28 +0000 |
commit | 7eb2d308830003432601f9b40ba5ccf7382b6157 (patch) | |
tree | f9017b6a2f4199b9c234850524d7937c13c7899b /src/syscall | |
parent | bb09f8a29b04b8fe4465d0b5d92f164979ee9213 (diff) | |
download | go-7eb2d308830003432601f9b40ba5ccf7382b6157.tar.gz go-7eb2d308830003432601f9b40ba5ccf7382b6157.zip |
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>
Diffstat (limited to 'src/syscall')
-rwxr-xr-x | src/syscall/mksyscall_libc.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/syscall/mksyscall_libc.pl b/src/syscall/mksyscall_libc.pl index 5ceedc812a..631a07c819 100755 --- a/src/syscall/mksyscall_libc.pl +++ b/src/syscall/mksyscall_libc.pl @@ -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 |