You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This captures code currently in the form of a draft PR at
bazel-contrib#4449. When this PR is merged, this
commit can be omitted from the cherry-picks onto our
`crl-release-*` branches.
This builds an executable from a set of source files,
@@ -136,7 +138,7 @@ This builds an executable from a set of source files,
136
138
<ul>
137
139
<li>[GoArchive]</li>
138
140
</ul>
139
-
141
+
140
142
141
143
### **Attributes**
142
144
@@ -159,6 +161,7 @@ This builds an executable from a set of source files,
159
161
| <aid="go_binary-gc_goopts"></a>gc_goopts | List of flags to add to the Go compilation command when using the gc compiler. Subject to ["Make variable"] substitution and [Bourne shell tokenization]. | List of strings | optional |[]|
160
162
| <aid="go_binary-gc_linkopts"></a>gc_linkopts | List of flags to add to the Go link command when using the gc compiler. Subject to ["Make variable"] substitution and [Bourne shell tokenization]. | List of strings | optional |[]|
161
163
| <aid="go_binary-goarch"></a>goarch | Forces a binary to be cross-compiled for a specific architecture. It's usually better to control this on the command line with <code>--platforms</code>.<br><br> This disables cgo by default, since a cross-compiling C/C++ toolchain is rarely available. To force cgo, set <code>pure</code> = <code>off</code>.<br><br> See [Cross compilation] for more information. | String | optional | "auto" |
164
+
| <aid="go_binary-gofips140"></a>gofips140 | Controls the GOFIPS140 environment variable. May be any string value. Common values include <code>"off"</code> (default), <code>"latest"</code>, and specific versions like <code>"v1.0.0"</code>. See [mode attributes], specifically [gofips140]. | String | optional | "off" |
162
165
| <aid="go_binary-goos"></a>goos | Forces a binary to be cross-compiled for a specific operating system. It's usually better to control this on the command line with <code>--platforms</code>.<br><br> This disables cgo by default, since a cross-compiling C/C++ toolchain is rarely available. To force cgo, set <code>pure</code> = <code>off</code>.<br><br> See [Cross compilation] for more information. | String | optional | "auto" |
163
166
| <aid="go_binary-gotags"></a>gotags | Enables a list of build tags when evaluating [build constraints]. Useful for conditional compilation. | List of strings | optional |[]|
164
167
| <aid="go_binary-importpath"></a>importpath | The import path of this binary. Binaries can't actually be imported, but this may be used by [go_path] and other tools to report the location of source files. This may be inferred from embedded libraries. | String | optional | "" |
@@ -191,7 +194,7 @@ This wraps an executable built by `go_binary` to cross compile it
191
194
<ul>
192
195
<li>[GoArchive]</li>
193
196
</ul>
194
-
197
+
195
198
196
199
### **Attributes**
197
200
@@ -226,7 +229,7 @@ This builds a Go library from a set of source files that are all part of
226
229
<li>[GoInfo]</li>
227
230
<li>[GoArchive]</li>
228
231
</ul>
229
-
232
+
230
233
231
234
### **Attributes**
232
235
@@ -269,7 +272,7 @@ go_path(<a href="#go_path-name">name</a>, <a href="#go_path-data">data</a>, <a h
269
272
`go_path` can depend on one or more Go targets (i.e., [go_library], [go_binary], or [go_test]).
270
273
It will include packages from those targets, as well as their transitive dependencies.
271
274
Packages will be in subdirectories named after their `importpath` or `importmap` attributes under a `src/` directory.
272
-
275
+
273
276
274
277
### **Attributes**
275
278
@@ -339,7 +342,7 @@ This declares a set of source files and related dependencies that can be embedde
339
342
<ul>
340
343
<li>[GoInfo]</li>
341
344
</ul>
342
-
345
+
343
346
344
347
### **Attributes**
345
348
@@ -363,8 +366,8 @@ This declares a set of source files and related dependencies that can be embedde
This builds a set of tests that can be run with `bazel test`.<br><br>
@@ -396,7 +399,7 @@ This builds a set of tests that can be run with `bazel test`.<br><br>
396
399
the name based on the last component of the path. For example, a test
397
400
in `//foo/bar` is named `bar_test`, and uses internal and external
398
401
sources.
399
-
402
+
400
403
401
404
### **Attributes**
402
405
@@ -419,6 +422,7 @@ This builds a set of tests that can be run with `bazel test`.<br><br>
419
422
| <aid="go_test-gc_goopts"></a>gc_goopts | List of flags to add to the Go compilation command when using the gc compiler. Subject to ["Make variable"] substitution and [Bourne shell tokenization]. | List of strings | optional |[]|
420
423
| <aid="go_test-gc_linkopts"></a>gc_linkopts | List of flags to add to the Go link command when using the gc compiler. Subject to ["Make variable"] substitution and [Bourne shell tokenization]. | List of strings | optional |[]|
421
424
| <aid="go_test-goarch"></a>goarch | Forces a binary to be cross-compiled for a specific architecture. It's usually better to control this on the command line with <code>--platforms</code>.<br><br> This disables cgo by default, since a cross-compiling C/C++ toolchain is rarely available. To force cgo, set <code>pure</code> = <code>off</code>.<br><br> See [Cross compilation] for more information. | String | optional | "auto" |
425
+
| <aid="go_test-gofips140"></a>gofips140 | Controls the GOFIPS140 environment variable. May be any string value. Common values include <code>"off"</code> (default), <code>"latest"</code>, and specific versions like <code>"v1.0.0"</code>. See [mode attributes], specifically [gofips140]. | String | optional | "off" |
422
426
| <aid="go_test-goos"></a>goos | Forces a binary to be cross-compiled for a specific operating system. It's usually better to control this on the command line with <code>--platforms</code>.<br><br> This disables cgo by default, since a cross-compiling C/C++ toolchain is rarely available. To force cgo, set <code>pure</code> = <code>off</code>.<br><br> See [Cross compilation] for more information. | String | optional | "auto" |
423
427
| <aid="go_test-gotags"></a>gotags | Enables a list of build tags when evaluating [build constraints]. Useful for conditional compilation. | List of strings | optional |[]|
424
428
| <aid="go_test-importpath"></a>importpath | The import path of this test. Tests can't actually be imported, but this may be used by [go_path] and other tools to report the location of source files. This may be inferred from embedded libraries. | String | optional | "" |
0 commit comments