Correct checking the shared library to also filter out empty values (#82)

This commit is contained in:
irengrig 2018-09-10 11:22:39 +02:00 committed by GitHub
parent 9949b17fe2
commit 06970670ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -61,16 +61,16 @@ def _perform_error_checks(
targets_windows):
# If the shared library will be provided by system during runtime, users are not supposed to
# specify shared_library.
if system_provided and shared_library_artifacts != None:
if system_provided and shared_library_artifacts:
fail("'shared_library' shouldn't be specified when 'system_provided' is true")
# If a shared library won't be provided by system during runtime and we are linking the shared
# library through interface library, the shared library must be specified.
if (not system_provided and shared_library_artifacts == None and
interface_library_artifacts != None):
if (not system_provided and shared_library_artifacts and
interface_library_artifacts):
fail("'shared_library' should be specified when 'system_provided' is false")
if targets_windows and shared_library_artifacts != None:
if targets_windows and shared_library_artifacts:
fail("'interface library' must be specified when using cc_import for " +
"shared library on Windows")