1Basic go_library functionality 2============================== 3 4.. _go_library: /docs/go/core/rules.md#_go_library 5.. _#1262: https://github.com/bazelbuild/rules_go/issues/1262 6.. _#1520: https://github.com/bazelbuild/rules_go/issues/1520 7.. _#1772: https://github.com/bazelbuild/rules_go/issues/1772 8.. _#2058: https://github.com/bazelbuild/rules_go/issues/2058 9.. _#3558: https://github.com/bazelbuild/rules_go/issues/3558 10 11empty 12----- 13 14Checks that a `go_library`_ will compile and link even if all the sources 15(including assembly sources) are filtered out by build constraints. 16 17asm_include 18----------- 19 20Checks that assembly files in a `go_library`_ may include other assembly 21files in the same library. Verifies `#1520`_. 22 23asm_header 24---------- 25 26Checks that assembly files in a `go_library`_ may include ``"go_asm.h"``, 27generated by the compiler. Verifies `#1262`_. 28 29package_height 30-------------- 31 32Checks that when a library embeds another library, the embedder's dependencies 33may override the embeddee's dependencies. Verifies `#1772`_. 34 35import_alias_test 36----------------- 37 38Checks that a library may import another library using one of the strings 39listed in ``importpath_aliases``. This is the basic mechanism for minimal 40module compatibility. Verifies `#2058`_. 41 42embedsrcs_test 43-------------- 44 45Checks that `go_library`_ can match ``//go:embed`` directives to files listed 46in the ``embedsrcs`` attribute and can pass those files to the compiler. 47 48embedsrcs_error_test 49-------------------- 50 51Verifies common errors with ``//go:embed`` directives are correctly reported. 52 53no_srcs_test 54------------ 55 56Verifies that `go_library`_ targets without Go source files build concurrently, 57even unsandboxed, and reproducibly. Verifies `#3558`_.