| diff --git a/ruby/private/bundle/create_bundle_build_file.rb b/ruby/private/bundle/create_bundle_build_file.rb |
| index b283b40..10dce4e 100755 |
| --- a/ruby/private/bundle/create_bundle_build_file.rb |
| +++ b/ruby/private/bundle/create_bundle_build_file.rb |
| @@ -38,6 +38,7 @@ GEM_TEMPLATE = <<~GEM_TEMPLATE |
| {gem_binaries} |
| ], |
| exclude = {exclude}, |
| + allow_empty = True, |
| ), |
| deps = {deps}, |
| includes = ["lib/ruby/{ruby_version}/gems/{name}-{version}/lib"], |
| @@ -47,7 +48,7 @@ GEM_TEMPLATE |
| ALL_GEMS = <<~ALL_GEMS |
| ruby_library( |
| name = "gems", |
| - srcs = glob([{bundle_lib_files}]) + glob(["bin/*"]), |
| + srcs = glob([{bundle_lib_files}], allow_empty = True) + glob(["bin/*"]), |
| includes = {bundle_lib_paths}, |
| ) |
| |
| diff --git a/ruby/private/toolchains/BUILD.runtime.tpl b/ruby/private/toolchains/BUILD.runtime.tpl |
| index fbb3e64..18fb412 100644 |
| --- a/ruby/private/toolchains/BUILD.runtime.tpl |
| +++ b/ruby/private/toolchains/BUILD.runtime.tpl |
| @@ -24,14 +24,20 @@ sh_binary( |
| |
| cc_import( |
| name = "libruby", |
| - hdrs = glob({hdrs}), |
| + hdrs = glob( |
| + include = {hdrs}, |
| + allow_empty = True, |
| + ), |
| shared_library = {shared_library}, |
| static_library = {static_library}, |
| ) |
| |
| cc_library( |
| name = "headers", |
| - hdrs = glob({hdrs}), |
| + hdrs = glob( |
| + include = {hdrs}, |
| + allow_empty = True, |
| + ), |
| includes = {includes}, |
| ) |
| |