File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,18 @@ def emit_link(
140
140
]))
141
141
extldflags .extend (cgo_rpaths )
142
142
143
+ # BUG: Have we forgotten about the .a files?
144
+ for f in archive .cgo_deps .to_list ():
145
+ extldflags .extend ([
146
+ "-L" , f .dirname ,
147
+ # This shenaningan converts "libzmq.a" into "-lzmq" as one would
148
+ # want in a CC command line.
149
+ "-l{}" .format (f .basename [3 :- 2 ])]
150
+ )
151
+ # We will need to link with stdc++ too if we want C++ stdlib to work.
152
+ # This is probably not correct for C programs. What to do?
153
+ extldflags .extend (["-lstdc++" ])
154
+
143
155
# Process x_defs, and record whether stamping is used.
144
156
stamp_x_defs_volatile = False
145
157
stamp_x_defs_stable = False
@@ -188,6 +200,7 @@ def emit_link(
188
200
]
189
201
inputs = depset (direct = inputs_direct , transitive = inputs_transitive )
190
202
203
+
191
204
go .actions .run (
192
205
inputs = inputs ,
193
206
outputs = [executable ],
You can’t perform that action at this time.
0 commit comments