cgo/

directory
v0.17.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2019 License: Apache-2.0

README

Basic cgo functionality
=======================

opts_test
---------

Checks that different sets of options are passed to C and C++ sources in a
``go_library`` with ``cgo = True``.

dylib_test
----------

Checks that Go binaries can link against dynamic C libraries. Some libraries
(especially those provided with ``cc_import``) may only have dynamic versions,
and we should be able to link against them and find them at run-time.

dylib_test
----------

Checks that Go binaries can link against dynamic C libraries that are only
available as a versioned shared library, like ``libfoo.so.1``.

cc_libs_test
------------

Checks that Go binaries that include cgo code may or may not link against
libstdc++, depending on how they're linked. This tests several binaries:

* ``pure_bin`` - built in ``"pure"`` mode, should not depend on libstdc++.
* ``c_srcs`` - has no C++ code in sources, should not depend on libstdc++.
* ``cc_srcs`` - has some C++ code in sources, should depend on libstdc++.
* ``cc_deps`` - depends on a ``cc_library``, should depend on libstdc++
  because we don't know what's in it.

race_test
---------

Checks that cgo code in a binary with ``race = "on"`` is compiled in race mode.
Verifies #1592.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL