Skip to content

Commit

Permalink
Minor reviewer fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
m3rcuriel authored and Lee Mracek committed Jan 29, 2023
1 parent c0ca3db commit 2825199
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/main/starlark/builtins_bzl/common/cc/cc_helper.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _grep_includes_executable(grep_includes):

def _check_src_extension(file, allowed_src_files, allow_versioned_shared_libraries):
extension = "." + file.extension
if _matches_extension(extension, allowed_src_files) or (allow_versioned_shared_libraries and _is_versioned_shared_library_extension_valid(file.path)):
if _matches_extension(extension, allowed_src_files) or (allow_versioned_shared_libraries and _is_versioned_library_extension_valid(file.path)):
return True
return False

Expand Down Expand Up @@ -532,16 +532,13 @@ def _is_versioned_library_extension_valid(shared_library_name):
return True
return False

def _is_versioned_shared_library_extension_valid(shared_library_name):
return _is_versioned_library_extension_valid(shared_library_name)

def _is_shared_library_extension_valid(shared_library_name):
if (shared_library_name.endswith(".so") or
shared_library_name.endswith(".dll") or
shared_library_name.endswith(".dylib")):
return True

return _is_versioned_shared_library_extension_valid(shared_library_name)
return _is_versioned_library_extension_valid(shared_library_name)

def _is_interface_library_extension_valid(interface_library_name):
if (interface_library_name.endswith(".ifso") or
Expand Down
2 changes: 1 addition & 1 deletion src/main/starlark/builtins_bzl/common/cc/cc_import.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _perform_error_checks(

if (interface_library_artifact != None and
not cc_helper.is_interface_library_extension_valid(interface_library_artifact.basename)):
fail("'interface_library' does not produce any cc_import interface_library files (expected .ifso, .tbd, .dll.a, .dylib, .so, or .lib)")
fail("'interface_library' does not produce any cc_import interface_library files (expected .ifso, .tbd, .dll.a, .dylib, .so or .lib)")

def _create_archive_action(
ctx,
Expand Down

0 comments on commit 2825199

Please sign in to comment.