Skip to content

Commit

Permalink
Fix cgo_library (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterebden authored Jan 25, 2024
1 parent e7c8ccb commit 6bc6dff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Version 1.15.1
--------------
* Fix cgo_library for package driver info generation

Version 1.15.0
--------------
* Generate correct subrepo info for package driver (#191)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.15.0
1.15.1
5 changes: 4 additions & 1 deletion build_defs/cgo.build_defs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ subinclude("///go//build_defs:go", "///cc//build_defs:c")
def cgo_library(name:str, srcs:list=[], resources:list=None, go_srcs:list=[], c_srcs:list=[], hdrs:list=[],
package:str=None, compiler_flags:list&cflags=[], linker_flags:list&ldflags=[], pkg_config:list=[],
subdir:str='', deps:list=[], visibility:list=None, test_only:bool&testonly=False, import_path:str='',
_module:str=''):
_module:str='', _subrepo:str=''):
"""Generates a Go library which can be reused by other rules.

Note that by its nature this is something of a hybrid of Go and C rules. It can depend
Expand Down Expand Up @@ -52,6 +52,7 @@ def cgo_library(name:str, srcs:list=[], resources:list=None, go_srcs:list=[], c_
visibility = visibility,
test_only = test_only,
_module = _module,
_subrepo = _subrepo,
)

file_srcs = [src for src in srcs if not src.startswith('/') and not src.startswith(':')]
Expand Down Expand Up @@ -115,6 +116,8 @@ def cgo_library(name:str, srcs:list=[], resources:list=None, go_srcs:list=[], c_
deps = deps,
_generate_import_config=False,
import_path=import_path,
_subrepo = _subrepo,
_module = _module,
)

output = package if package else name
Expand Down

0 comments on commit 6bc6dff

Please sign in to comment.