xref: /aosp_15_r20/external/bazelbuild-rules_go/tests/core/c_linkmodes/README.rst (revision 9bb1b549b6a84214c53be0924760be030e66b93a)
1c-archive / c-shared linkmodes
2==============================
3
4.. _go_binary: /docs/go/core/rules.md#go_binary
5.. _#2132: https://github.com/bazelbuild/rules_go/issues/2132
6.. _#2138: https://github.com/bazelbuild/rules_go/issues/2138
7
8Tests to ensure that c-archive link mode is working as expected.
9
10.. contents::
11
12c-archive_test
13--------------
14
15Checks that a ``go_binary`` can be built in ``c-archive`` mode and linked into
16a C/C++ binary as a dependency.
17
18c-archive_empty_hdr_test
19------------------------
20
21Checks that a ``go_binary`` built with in ``c-archive`` mode without cgo code
22still produces an empty header file. Verifies `#2132`_.
23
24c-shared_test
25-------------
26
27Checks that a ``go_binary`` can be built in ``c-shared`` mode and linked into
28a C/C++ binary as a dependency.
29
30c-shared_dl_test
31----------------
32
33Checks that a ``go_binary`` can be built in ``c-shared`` mode and loaded
34dynamically from a C/C++ binary. The binary depends on a package in
35``org_golang_x_crypto`` with a fair amount of assembly code. Verifies `#2138`_.
36