@@ -43,6 +43,10 @@ go build -overlay overlay.json -o main_cgo_angle$GOEXE ./cgo_hello_angle
43
43
exec ./main_cgo_angle$GOEXE
44
44
stdout '^hello cgo\r?\n'
45
45
46
+ go build -overlay overlay.json -o main_call_asm$GOEXE ./call_asm
47
+ exec ./main_call_asm$GOEXE
48
+ ! stdout .
49
+
46
50
go list -compiled -overlay overlay.json -f '{{range .CompiledGoFiles}}{{. | printf "%s\n"}}{{end}}' ./cgo_hello_replace
47
51
cp stdout compiled_cgo_sources.txt
48
52
go run ../print_line_comments.go compiled_cgo_sources.txt
@@ -79,6 +83,10 @@ go build -compiler=gccgo -overlay overlay.json -o main_cgo_angle_gccgo$GOEXE ./
79
83
exec ./main_cgo_angle_gccgo$GOEXE
80
84
stdout '^hello cgo\r?\n'
81
85
86
+ go build -compiler=gccgo -overlay overlay.json -o main_call_asm_gccgo$GOEXE ./call_asm
87
+ exec ./main_call_asm_gccgo$GOEXE
88
+ ! stdout .
89
+
82
90
-- m/go.mod --
83
91
// TODO(matloob): how do overlays work with go.mod (especially if mod=readonly)
84
92
module m
@@ -105,6 +113,7 @@ the actual code is in the overlay
105
113
"dir2/i.go": "overlay/dir2_i.go",
106
114
"printpath/main.go": "overlay/printpath.go",
107
115
"printpath/other.go": "overlay2/printpath2.go",
116
+ "call_asm/asm.s": "overlay/asm_file.s",
108
117
"cgo_hello_replace/cgo_header.h": "overlay/cgo_head.h",
109
118
"cgo_hello_replace/hello.c": "overlay/hello.c",
110
119
"cgo_hello_quote/cgo_hello.go": "overlay/cgo_hello_quote.go",
@@ -139,6 +148,14 @@ import "m/dir2"
139
148
func main() {
140
149
dir2.PrintMessage()
141
150
}
151
+ -- m/call_asm/main.go --
152
+ package main
153
+
154
+ func foo() // There will be a "missing function body" error if the assembly file isn't found.
155
+
156
+ func main() {
157
+ foo()
158
+ }
142
159
-- m/overlay/dir_g.go --
143
160
package dir
144
161
0 commit comments