From 9666e8bf11722f28fba0423796ac5ca5d0de784d Mon Sep 17 00:00:00 2001 From: Jon Parise Date: Thu, 9 Sep 2021 15:42:43 -0700 Subject: [PATCH] Improve objc header detection (#283) This fixes the logic introduced in #281. --- BazelExtensions/xcode_configuration_provider.bzl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/BazelExtensions/xcode_configuration_provider.bzl b/BazelExtensions/xcode_configuration_provider.bzl index da30fa1..a146c72 100644 --- a/BazelExtensions/xcode_configuration_provider.bzl +++ b/BazelExtensions/xcode_configuration_provider.bzl @@ -94,9 +94,8 @@ def _extract_generated_sources(target, ctx): if CcInfo in target: cc_info = target[CcInfo] files.append(cc_info.compilation_context.headers) - elif hasattr(target, "objc"): - objc = target.objc - files.append(objc.header) + elif hasattr(target, "objc") and hasattr(target.objc, "header"): + files.append(target.objc.header) if hasattr(target, "objc"): objc = target.objc