The go_binary_c_archive_shared macro declares several additional targets around go_binary rules with linkmode = "c-shared" or "c-archive". One of these gathers all the .h files in the cgo_exports output group and concatenates them into a single header.
This is not what the Go command does. Only the export header for the main package should be visible. Incorporating headers from other packages adds confusion.
The
go_binary_c_archive_sharedmacro declares several additional targets aroundgo_binaryrules withlinkmode = "c-shared"or"c-archive". One of these gathers all the .h files in thecgo_exportsoutput group and concatenates them into a single header.This is not what the Go command does. Only the export header for the
mainpackage should be visible. Incorporating headers from other packages adds confusion.