Skip to content

Commit

Permalink
Fix product_type when using link_dynamic (#741)
Browse files Browse the repository at this point in the history
* Fix product_type when link_dynamic is True
* Update fixtures
* Hard code product_type
  • Loading branch information
thiagohmcruz committed Jul 20, 2023
1 parent 39eb266 commit 89e9395
Show file tree
Hide file tree
Showing 37 changed files with 125 additions and 43 deletions.
5 changes: 3 additions & 2 deletions rules/framework.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@ def _bundle_dynamic_framework(ctx, is_extension_safe, avoid_deps):

# TODO(jmarino) - consider how to better handle frameworks of frameworks
processor_partials = []

processor_partials.append(
partials.apple_bundle_info_partial(
actions = actions,
Expand All @@ -724,7 +725,7 @@ def _bundle_dynamic_framework(ctx, is_extension_safe, avoid_deps):
label_name = label.name,
platform_prerequisites = platform_prerequisites,
predeclared_outputs = predeclared_outputs,
product_type = rule_descriptor.product_type,
product_type = apple_product_type.framework,
),
)
processor_partials.append(
Expand Down Expand Up @@ -945,7 +946,7 @@ def _bundle_static_framework(ctx, is_extension_safe, current_apple_platform, out
minimum_os_version = str(current_apple_platform.target_os_version),
minimum_deployment_os_version = ctx.attr.minimum_deployment_os_version,
platform_type = str(current_apple_platform.platform.platform_type),
product_type = ctx.attr._product_type,
product_type = apple_product_type.static_framework,
uses_swift = outputs.swiftmodule != None,
),
] + partial_output.providers)
Expand Down
2 changes: 1 addition & 1 deletion rules/legacy_xcodeproj.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ def _populate_xcodeproj_targets_and_schemes(ctx, targets, src_dot_dots, all_tran
if product_type != existing_type:
fail(_CONFLICTING_TARGET_MSG.format(ctx.label, target_name, existing_type, target_info.bazel_build_target_name, target_info.product_type))

target_macho_type = "staticlib" if product_type == "framework" else "$(inherited)"
target_macho_type = "staticlib" if product_type == "framework.static" else "$(inherited)"
compiled_sources = [{
"path": paths.join(src_dot_dots, s.short_path),
"optional": True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ find "${BAZEL_DIAGNOSTICS_DIR}" -type f -atime +7d -delete
case "${PRODUCT_TYPE}" in
com.apple.product-type.framework)
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${TARGET_NAME}/${FULL_PRODUCT_NAME}")
if [ ! -d "$input_options" ]; then
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${FULL_PRODUCT_NAME}")
fi
;;
com.apple.product-type.framework.static)
# For static library, as the output is not under bazel-bin, we have to get it based on build event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ find "${BAZEL_DIAGNOSTICS_DIR}" -type f -atime +7d -delete
case "${PRODUCT_TYPE}" in
com.apple.product-type.framework)
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${TARGET_NAME}/${FULL_PRODUCT_NAME}")
if [ ! -d "$input_options" ]; then
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${FULL_PRODUCT_NAME}")
fi
;;
com.apple.product-type.framework.static)
# For static library, as the output is not under bazel-bin, we have to get it based on build event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
HEADER_SEARCH_PATHS = "\"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-dbg-ST-d31cf6d5fbab/bin/tests/ios/frameworks/objc/ObjcFramework_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-dbg-ST-d31cf6d5fbab/bin/tests/ios/frameworks/objc/ObjcFramework_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT\"";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACH_O_TYPE = "$(inherited)";
MACH_O_TYPE = staticlib;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = ObjcFramework;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
Expand All @@ -324,7 +324,7 @@
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
HEADER_SEARCH_PATHS = "\"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-dbg-ST-d31cf6d5fbab/bin/tests/ios/frameworks/objc/ObjcFrameworkTestLib_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT\"";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACH_O_TYPE = "$(inherited)";
MACH_O_TYPE = staticlib;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = ObjcFrameworkTestLib;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
Expand Down Expand Up @@ -392,7 +392,7 @@
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
HEADER_SEARCH_PATHS = "\"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-dbg-ST-d31cf6d5fbab/bin/tests/ios/frameworks/objc/ObjcFramework_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-dbg-ST-d31cf6d5fbab/bin/tests/ios/frameworks/objc/ObjcFramework_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT\"";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACH_O_TYPE = "$(inherited)";
MACH_O_TYPE = staticlib;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = ObjcFramework;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
Expand Down Expand Up @@ -454,7 +454,7 @@
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
HEADER_SEARCH_PATHS = "\"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-dbg-ST-d31cf6d5fbab/bin/tests/ios/frameworks/objc/ObjcFrameworkTestLib_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT\"";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACH_O_TYPE = "$(inherited)";
MACH_O_TYPE = staticlib;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = ObjcFrameworkTestLib;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
Expand All @@ -476,7 +476,7 @@
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
HEADER_SEARCH_PATHS = "\"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-dbg-ST-d31cf6d5fbab/bin/tests/ios/frameworks/objc/ObjcFramework_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-dbg-ST-d31cf6d5fbab/bin/tests/ios/frameworks/objc/ObjcFramework_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT\"";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACH_O_TYPE = "$(inherited)";
MACH_O_TYPE = staticlib;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = ObjcFramework;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
Expand Down Expand Up @@ -597,7 +597,7 @@
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
HEADER_SEARCH_PATHS = "\"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-dbg-ST-d31cf6d5fbab/bin/tests/ios/frameworks/objc/ObjcFrameworkTestLib_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT\"";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACH_O_TYPE = "$(inherited)";
MACH_O_TYPE = staticlib;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = ObjcFrameworkTestLib;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
Expand Down Expand Up @@ -657,7 +657,7 @@
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
HEADER_SEARCH_PATHS = "\"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-dbg-ST-d31cf6d5fbab/bin/tests/ios/frameworks/objc/ObjcFramework_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-dbg-ST-d31cf6d5fbab/bin/tests/ios/frameworks/objc/ObjcFramework_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT\"";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACH_O_TYPE = "$(inherited)";
MACH_O_TYPE = staticlib;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = ObjcFramework;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
Expand Down Expand Up @@ -702,7 +702,7 @@
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
HEADER_SEARCH_PATHS = "\"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-dbg-ST-d31cf6d5fbab/bin/tests/ios/frameworks/objc/ObjcFrameworkTestLib_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT\"";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACH_O_TYPE = "$(inherited)";
MACH_O_TYPE = staticlib;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = ObjcFrameworkTestLib;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ find "${BAZEL_DIAGNOSTICS_DIR}" -type f -atime +7d -delete
case "${PRODUCT_TYPE}" in
com.apple.product-type.framework)
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${TARGET_NAME}/${FULL_PRODUCT_NAME}")
if [ ! -d "$input_options" ]; then
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${FULL_PRODUCT_NAME}")
fi
;;
com.apple.product-type.framework.static)
# For static library, as the output is not under bazel-bin, we have to get it based on build event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ find "${BAZEL_DIAGNOSTICS_DIR}" -type f -atime +7d -delete
case "${PRODUCT_TYPE}" in
com.apple.product-type.framework)
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${TARGET_NAME}/${FULL_PRODUCT_NAME}")
if [ ! -d "$input_options" ]; then
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${FULL_PRODUCT_NAME}")
fi
;;
com.apple.product-type.framework.static)
# For static library, as the output is not under bazel-bin, we have to get it based on build event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
HEADER_SEARCH_PATHS = "\"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-arm64-min10.0-applebin_ios-ios_arm64-dbg-ST-65c06fec92bf/bin/tests/ios/app/OnlySources_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT\"";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACH_O_TYPE = "$(inherited)";
MACH_O_TYPE = staticlib;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = OnlySources;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
Expand All @@ -416,7 +416,7 @@
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
HEADER_SEARCH_PATHS = "\"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-arm64-min10.0-applebin_ios-ios_arm64-dbg-ST-65c06fec92bf/bin/tests/ios/app/FW_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-arm64-min10.0-applebin_ios-ios_arm64-dbg-ST-65c06fec92bf/bin/tests/ios/app/FW_private_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-arm64-min10.0-applebin_ios-ios_arm64-dbg-ST-65c06fec92bf/bin/tests/ios/app/FW_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-arm64-min10.0-applebin_ios-ios_arm64-dbg-ST-65c06fec92bf/bin/tests/ios/app/FW_private_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT\"";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACH_O_TYPE = "$(inherited)";
MACH_O_TYPE = staticlib;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = FW;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
Expand All @@ -438,7 +438,7 @@
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
HEADER_SEARCH_PATHS = "\"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-arm64-min10.0-applebin_ios-ios_arm64-dbg-ST-65c06fec92bf/bin/tests/ios/app/OnlySources_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT\"";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACH_O_TYPE = "$(inherited)";
MACH_O_TYPE = staticlib;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = OnlySources;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
Expand Down Expand Up @@ -485,7 +485,7 @@
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
HEADER_SEARCH_PATHS = "\"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-arm64-min10.0-applebin_ios-ios_arm64-dbg-ST-65c06fec92bf/bin/tests/ios/app/FW2_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-arm64-min10.0-applebin_ios-ios_arm64-dbg-ST-65c06fec92bf/bin/tests/ios/app/FW2_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT\"";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACH_O_TYPE = "$(inherited)";
MACH_O_TYPE = staticlib;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = FW2;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
Expand Down Expand Up @@ -568,7 +568,7 @@
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
HEADER_SEARCH_PATHS = "\"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-arm64-min10.0-applebin_ios-ios_arm64-dbg-ST-65c06fec92bf/bin/tests/ios/app/FW2_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-arm64-min10.0-applebin_ios-ios_arm64-dbg-ST-65c06fec92bf/bin/tests/ios/app/FW2_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT\"";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACH_O_TYPE = "$(inherited)";
MACH_O_TYPE = staticlib;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = FW2;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
Expand All @@ -590,7 +590,7 @@
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
HEADER_SEARCH_PATHS = "\"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-arm64-min10.0-applebin_ios-ios_arm64-dbg-ST-65c06fec92bf/bin/tests/ios/app/FW_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-arm64-min10.0-applebin_ios-ios_arm64-dbg-ST-65c06fec92bf/bin/tests/ios/app/FW_private_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-arm64-min10.0-applebin_ios-ios_arm64-dbg-ST-65c06fec92bf/bin/tests/ios/app/FW_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-arm64-min10.0-applebin_ios-ios_arm64-dbg-ST-65c06fec92bf/bin/tests/ios/app/FW_private_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT\"";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACH_O_TYPE = "$(inherited)";
MACH_O_TYPE = staticlib;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = FW;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ find "${BAZEL_DIAGNOSTICS_DIR}" -type f -atime +7d -delete
case "${PRODUCT_TYPE}" in
com.apple.product-type.framework)
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${TARGET_NAME}/${FULL_PRODUCT_NAME}")
if [ ! -d "$input_options" ]; then
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${FULL_PRODUCT_NAME}")
fi
;;
com.apple.product-type.framework.static)
# For static library, as the output is not under bazel-bin, we have to get it based on build event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ find "${BAZEL_DIAGNOSTICS_DIR}" -type f -atime +7d -delete
case "${PRODUCT_TYPE}" in
com.apple.product-type.framework)
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${TARGET_NAME}/${FULL_PRODUCT_NAME}")
if [ ! -d "$input_options" ]; then
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${FULL_PRODUCT_NAME}")
fi
;;
com.apple.product-type.framework.static)
# For static library, as the output is not under bazel-bin, we have to get it based on build event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ find "${BAZEL_DIAGNOSTICS_DIR}" -type f -atime +7d -delete
case "${PRODUCT_TYPE}" in
com.apple.product-type.framework)
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${TARGET_NAME}/${FULL_PRODUCT_NAME}")
if [ ! -d "$input_options" ]; then
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${FULL_PRODUCT_NAME}")
fi
;;
com.apple.product-type.framework.static)
# For static library, as the output is not under bazel-bin, we have to get it based on build event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ find "${BAZEL_DIAGNOSTICS_DIR}" -type f -atime +7d -delete
case "${PRODUCT_TYPE}" in
com.apple.product-type.framework)
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${TARGET_NAME}/${FULL_PRODUCT_NAME}")
if [ ! -d "$input_options" ]; then
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${FULL_PRODUCT_NAME}")
fi
;;
com.apple.product-type.framework.static)
# For static library, as the output is not under bazel-bin, we have to get it based on build event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
HEADER_SEARCH_PATHS = "\"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-dbg-ST-d31cf6d5fbab/bin/tests/ios/app/FW_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-dbg-ST-d31cf6d5fbab/bin/tests/ios/app/FW_private_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT\"";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACH_O_TYPE = "$(inherited)";
MACH_O_TYPE = staticlib;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = FW;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
Expand Down Expand Up @@ -244,7 +244,7 @@
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
HEADER_SEARCH_PATHS = "\"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-dbg-ST-d31cf6d5fbab/bin/tests/ios/app/FW_public_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT/bazel-out/ios-x86_64-min10.0-applebin_ios-ios_x86_64-dbg-ST-d31cf6d5fbab/bin/tests/ios/app/FW_private_hmap.hmap\" \"$BAZEL_WORKSPACE_ROOT\"";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACH_O_TYPE = "$(inherited)";
MACH_O_TYPE = staticlib;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = FW;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "\"$(inherited)\"";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ find "${BAZEL_DIAGNOSTICS_DIR}" -type f -atime +7d -delete
case "${PRODUCT_TYPE}" in
com.apple.product-type.framework)
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${TARGET_NAME}/${FULL_PRODUCT_NAME}")
if [ ! -d "$input_options" ]; then
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${FULL_PRODUCT_NAME}")
fi
;;
com.apple.product-type.framework.static)
# For static library, as the output is not under bazel-bin, we have to get it based on build event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ find "${BAZEL_DIAGNOSTICS_DIR}" -type f -atime +7d -delete
case "${PRODUCT_TYPE}" in
com.apple.product-type.framework)
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${TARGET_NAME}/${FULL_PRODUCT_NAME}")
if [ ! -d "$input_options" ]; then
input_options=("bazel-bin/$BAZEL_BIN_SUBDIR/${FULL_PRODUCT_NAME}")
fi
;;
com.apple.product-type.framework.static)
# For static library, as the output is not under bazel-bin, we have to get it based on build event
Expand Down
Loading

0 comments on commit 89e9395

Please sign in to comment.