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
423e4102
Commit
423e4102
authored
Aug 25, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gotest: allow make test of cgo packages (without make install)
R=r CC=golang-dev, stevvooe
https://golang.org/cl/1995051
parent
15f336b6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
src/Make.pkg
src/Make.pkg
+8
-4
src/cmd/gotest/gotest
src/cmd/gotest/gotest
+6
-0
No files found.
src/Make.pkg
View file @
423e4102
...
...
@@ -138,12 +138,16 @@ _CGO_LDFLAGS_darwin=-dynamiclib -Wl,-undefined,dynamic_lookup
_cgo_defun.$O: _cgo_defun.c
$(CC) $(CFLAGS) $(RUNTIME_CFLAGS) _cgo_defun.c
_cgo_
.so: $(GCC_OFILES) $(CGO_DEPS)
$(CGOTARG)
.so: $(GCC_OFILES) $(CGO_DEPS)
$(HOST_CC) $(_CGO_CFLAGS_$(GOARCH)) -o $@ $(GCC_OFILES) $(CGO_LDFLAGS) $(_CGO_LDFLAGS_$(GOOS))
$(pkgdir)/$(CGOTARG).so: _cgo_.so
@test -d $(QUOTED_GOROOT)/pkg && mkdir -p $(pkgdir)/$(dir)
cp _cgo_.so "$@"
$(pkgdir)/$(CGOTARG).so: $(CGOTARG).so
@test -d $(QUOTED_GOROOT)/pkg && mkdir -p $(pkgdir)
cp $(CGOTARG).so "$@"
ifneq ($(CGOFILES),)
testpackage: $(CGOTARG).so
endif
# Generic build rules.
# These come last so that the rules above can override them
...
...
src/cmd/gotest/gotest
View file @
423e4102
...
...
@@ -174,4 +174,10 @@ importpath=$(gomake -s importpath)
$GC
_testmain.go
$GL
_testmain.
$O
# Set dynamic linker library path, no matter what it's called,
# to include the current directory while running $O.out,
# so that cgo libraries can be tested without installation.
LD_LIBRARY_PATH
=
.:
$LD_LIBRARY_PATH
\
DYLD_LIBRARY_PATH
=
.:
$DYLD_LIBRARY_PATH
\
$E
./
$O
.out
"
$@
"
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