Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
b4fb00b6
Commit
b4fb00b6
authored
Feb 08, 2010
by
Andrew Gerrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*l/*c: add -V flag to display version number
R=rsc CC=golang-dev
https://golang.org/cl/204044
parent
abe6a5b0
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
50 additions
and
1 deletion
+50
-1
src/cmd/5l/doc.go
src/cmd/5l/doc.go
+2
-0
src/cmd/5l/obj.c
src/cmd/5l/obj.c
+3
-0
src/cmd/6l/doc.go
src/cmd/6l/doc.go
+2
-0
src/cmd/6l/obj.c
src/cmd/6l/obj.c
+3
-0
src/cmd/8l/doc.go
src/cmd/8l/doc.go
+2
-0
src/cmd/8l/obj.c
src/cmd/8l/obj.c
+3
-0
src/cmd/gc/doc.go
src/cmd/gc/doc.go
+2
-0
src/cmd/gc/lex.c
src/cmd/gc/lex.c
+4
-0
src/lib9/Makefile
src/lib9/Makefile
+1
-1
src/lib9/goos.c
src/lib9/goos.c
+6
-0
src/version.bash
src/version.bash
+22
-0
No files found.
src/cmd/5l/doc.go
View file @
b4fb00b6
...
...
@@ -23,6 +23,8 @@ Options new in this version:
-L dir1,dir2,..
Search for libraries (package files) in the comma-separated list of directories.
The default is the single location $GOROOT/pkg/$GOOS_arm.
-V
Print the linker version.
*/
package
documentation
src/cmd/5l/obj.c
View file @
b4fb00b6
...
...
@@ -141,6 +141,9 @@ main(int argc, char *argv[])
if
(
argv
[
1
]
!=
nil
&&
argv
[
1
][
0
]
!=
'-'
&&
!
isobjfile
(
argv
[
1
]))
readundefs
(
ARGF
(),
SIMPORT
);
break
;
case
'V'
:
print
(
"%cl version %s
\n
"
,
thechar
,
getgoversion
());
errorexit
();
}
ARGEND
USED
(
argc
);
...
...
src/cmd/6l/doc.go
View file @
b4fb00b6
...
...
@@ -35,6 +35,8 @@ Options new in this version:
-L dir1,dir2,..
Search for libraries (package files) in the comma-separated list of directories.
The default is the single location $GOROOT/pkg/$GOOS_amd64.
-V
Print the linker version.
*/
...
...
src/cmd/6l/obj.c
View file @
b4fb00b6
...
...
@@ -136,6 +136,9 @@ main(int argc, char *argv[])
if
(
argv
[
1
]
!=
nil
&&
argv
[
1
][
0
]
!=
'-'
&&
!
isobjfile
(
argv
[
1
]))
readundefs
(
ARGF
(),
SIMPORT
);
break
;
case
'V'
:
print
(
"%cl version %s
\n
"
,
thechar
,
getgoversion
());
errorexit
();
}
ARGEND
if
(
argc
!=
1
)
...
...
src/cmd/8l/doc.go
View file @
b4fb00b6
...
...
@@ -32,6 +32,8 @@ Options new in this version:
-L dir1,dir2,..
Search for libraries (package files) in the comma-separated list of directories.
The default is the single location $GOROOT/pkg/$GOOS_386.
-V
Print the linker version.
*/
...
...
src/cmd/8l/obj.c
View file @
b4fb00b6
...
...
@@ -142,6 +142,9 @@ main(int argc, char *argv[])
if
(
argv
[
1
]
!=
nil
&&
argv
[
1
][
0
]
!=
'-'
&&
!
isobjfile
(
argv
[
1
]))
readundefs
(
ARGF
(),
SIMPORT
);
break
;
case
'V'
:
print
(
"%cl version %s
\n
"
,
thechar
,
getgoversion
());
errorexit
();
}
ARGEND
if
(
argc
!=
1
)
...
...
src/cmd/gc/doc.go
View file @
b4fb00b6
...
...
@@ -38,6 +38,8 @@ Flags:
disable optimization
-S
write assembly language text to standard output
-V
print the compiler version
There are also a number of debugging flags; run the command with no arguments
to get a usage message.
...
...
src/cmd/gc/lex.c
View file @
b4fb00b6
...
...
@@ -65,6 +65,9 @@ main(int argc, char *argv[])
case
'I'
:
addidir
(
ARGF
());
break
;
case
'V'
:
print
(
"%cg version %s
\n
"
,
thechar
,
getgoversion
());
errorexit
();
}
ARGEND
if
(
argc
<
1
)
...
...
@@ -168,6 +171,7 @@ usage:
print
(
" -h panic on an error
\n
"
);
print
(
" -o file specify output file
\n
"
);
print
(
" -S print the assembly language
\n
"
);
print
(
" -V print the compiler version
\n
"
);
print
(
" -w print the parse tree after typing
\n
"
);
print
(
" -x print lex tokens
\n
"
);
exit
(
0
);
...
...
src/lib9/Makefile
View file @
b4fb00b6
...
...
@@ -117,7 +117,7 @@ $(LIB): $(OFILES)
$(CC)
-c
$(CFLAGS)
$<
goos.$O
:
goos.c
$(CC)
-c
$(CFLAGS)
-DGOOS
=
'"
$(GOOS)
"'
-DGOARCH
=
'"
$(GOARCH)
"'
-DGOROOT
=
'"
$(GOROOT)
"'
$<
$(CC)
-c
$(CFLAGS)
-DGOOS
=
'"
$(GOOS)
"'
-DGOARCH
=
'"
$(GOARCH)
"'
-DGOROOT
=
'"
$(GOROOT)
"'
-DGOVERSION
=
'"'
"
$$
(../version.bash)"
'"'
$<
clean
:
rm
-f
*
.
$O
*
.6 6.out
$(LIB)
...
...
src/lib9/goos.c
View file @
b4fb00b6
...
...
@@ -33,3 +33,9 @@ getgoroot(void)
{
return
defgetenv
(
"GOROOT"
,
GOROOT
);
}
char
*
getgoversion
(
void
)
{
return
GOVERSION
;
}
src/version.bash
0 → 100755
View file @
b4fb00b6
#!/usr/bin/env bash
# Copyright 2010 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Check that we can use 'hg'
if
!
hg version
>
/dev/null 2>&1
;
then
echo
'hg not installed'
1>&2
exit
2
fi
# Get numerical revision
VERSION
=
"
`
hg identify
-n
`
"
# Append tag if not 'tip'
TAG
=
$(
hg identify
-t
|
sed
's!/release!!'
)
if
[[
"
$TAG
"
!=
"tip"
]]
;
then
VERSION
=
"
$VERSION
$TAG
"
fi
echo
$VERSION
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment