@@ -44,47 +44,54 @@ The build settings below are defined in the package
4444``@io_bazel_rules_go//go/config ``. They can all be set on the command line
4545or using `Bazel configuration transitions `_.
4646
47- +-------------------+ ----------------+ -----------------------------------------+
48- | **Name ** | **Type ** | **Default value ** |
49- +-------------------+ ---------------------+ ------------------------------------+
50- | :param: `static ` | :type: `bool ` | :value: `false ` |
51- +-------------------+ ---------------------+ ------------------------------------+
47+ +------------------------+ ---------------------+ -------------------------------+
48+ | **Name ** | **Type ** | **Default value ** |
49+ +------------------------+ ---------------------+ -------------------------------+
50+ | :param: `static ` | :type: `bool ` | :value: `false ` |
51+ +------------------------+ ---------------------+ -------------------------------+
5252| Statically links the target binary. May not always work since parts of the |
5353| standard library and other C dependencies won't tolerate static linking. |
5454| Works best with ``pure `` set as well. |
55- +-------------------+ ---------------------+ ------------------------------------+
56- | :param: `race ` | :type: `bool ` | :value: `false ` |
57- +-------------------+ ---------------------+ ------------------------------------+
55+ +------------------------+ ---------------------+ -------------------------------+
56+ | :param: `race ` | :type: `bool ` | :value: `false ` |
57+ +------------------------+ ---------------------+ -------------------------------+
5858| Instruments the binary for race detection. Programs will panic when a data |
5959| race is detected. Requires cgo. Mutually exclusive with ``msan ``. |
60- +-------------------+ ---------------------+ ------------------------------------+
61- | :param: `msan ` | :type: `bool ` | :value: `false ` |
62- +-------------------+ ---------------------+ ------------------------------------+
60+ +------------------------+ ---------------------+ -------------------------------+
61+ | :param: `msan ` | :type: `bool ` | :value: `false ` |
62+ +------------------------+ ---------------------+ -------------------------------+
6363| Instruments the binary for memory sanitization. Requires cgo. Mutually |
6464| exclusive with ``race ``. |
65- +-------------------+ ---------------------+ ------------------------------------+
66- | :param: `pure ` | :type: `bool ` | :value: `false ` |
67- +-------------------+ ---------------------+ ------------------------------------+
65+ +------------------------+ ---------------------+ -------------------------------+
66+ | :param: `pure ` | :type: `bool ` | :value: `false ` |
67+ +------------------------+ ---------------------+ -------------------------------+
6868| Disables cgo, even when a C/C++ toolchain is configured (similar to setting |
6969| ``CGO_ENABLED=0 ``). Packages that contain cgo code may still be built, but |
7070| the cgo code will be filtered out, and the ``cgo `` build tag will be false. |
71- +-------------------+ ---------------------+ ------------------------------------+
72- | :param: `debug ` | :type: `bool ` | :value: `false ` |
73- +-------------------+ ---------------------+ ------------------------------------+
71+ +------------------------+ ---------------------+ -------------------------------+
72+ | :param: `debug ` | :type: `bool ` | :value: `false ` |
73+ +------------------------+ ---------------------+ -------------------------------+
7474| Includes debugging information in compiled packages (using the ``-N `` and |
7575| ``-l `` flags). This is always true with ``-c dbg ``. |
76- +-------------------+ ---------------------+ ------------------------------------+
77- | :param: `gotags ` | :type: `string_list ` | :value: `[] ` |
78- +-------------------+ ---------------------+ ------------------------------------+
76+ +------------------------+ ---------------------+ -------------------------------+
77+ | :param: `gotags ` | :type: `string_list ` | :value: `[] ` |
78+ +------------------------+ ---------------------+ -------------------------------+
7979| Controls which build tags are enabled when evaluating build constraints in |
8080| source files. Useful for conditional compilation. |
81- +-------------------+ ---------------------+ ------------------------------------+
82- | :param: `linkmode ` | :type: `string ` | :value: `"normal" ` |
83- +-------------------+ ---------------------+ ------------------------------------+
81+ +------------------------+ ---------------------+ -------------------------------+
82+ | :param: `linkmode ` | :type: `string ` | :value: `"normal" ` |
83+ +------------------------+ ---------------------+ -------------------------------+
8484| Determines how the Go binary is built and linked. Similar to ``-buildmode ``. |
8585| Must be one of ``"normal" ``, ``"shared" ``, ``"pie" ``, ``"plugin" ``, |
8686| ``"c-shared" ``, ``"c-archive" ``. |
87- +-------------------+---------------------+------------------------------------+
87+ +------------------------+---------------------+-------------------------------+
88+ | :param: `export_stdlib ` | :type: `bool ` | :value: `false ` |
89+ +------------------------+---------------------+-------------------------------+
90+ | This controls whether exports for the stdlib are generated by rules_go. |
91+ | This is useful for running tools like golintci-lint via GOPACKAGESDRIVER |
92+ | but adds time to the initial build. Leave false unless you want to use |
93+ | golangci-lint or another tool that relies on GOPACKAGESDRIVER. |
94+ +------------------------+---------------------+-------------------------------+
8895
8996Platforms
9097---------
0 commit comments