• Home
Name Date Size #Lines LOC

..--

BUILD.bazelD04-Jul-20253.4 KiB140126

README.rstD04-Jul-20251 KiB3624

add.goD04-Jul-2025131 126

add_sandwich.cD04-Jul-202571 64

add_sandwich.goD04-Jul-2025208 156

add_sandwich.hD04-Jul-202523 21

add_test_archive.cD04-Jul-2025231 129

add_test_sandwich.cD04-Jul-2025240 129

add_test_shared.cD04-Jul-2025230 129

c-archive_empty_hdr_test.cD04-Jul-2025698 182

crypto.goD04-Jul-2025171 1912

crypto_test_dl.cD04-Jul-2025518 3125

empty.goD04-Jul-202529 42

go_with_cgo_dep.goD04-Jul-2025784 3010

go_with_cgo_dep_caller.ccD04-Jul-2025715 215

skip.cD04-Jul-202529 43

README.rst

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