rules_apple icon indicating copy to clipboard operation
rules_apple copied to clipboard

Can `build --enable_platform_specific_config` automatically detect the right APPLE_SDK_PLATFORM for build target?

Open tinder-kaijing opened this issue 7 months ago • 3 comments

Hi,

When we upgrade Bazel from 6.x to 7.x, it seems that the flag build --apple_platform_type=ios no longer works. We expect to use the below config in .bazelrc, to detect the targets automatically. If the build target is ios_arm64, it will include all ios standard libraries. If the build target is "macos_arm64", it will include all macOS libraries.

build --enable_platform_specific_config
build:macos --apple_crosstool_top=@local_config_apple_cc//:toolchain
build:macos --crosstool_top=@local_config_apple_cc//:toolchain
build:macos --host_crosstool_top=@local_config_apple_cc//:toolchain

However, likely it doesn't work that way. when we try to build an iOS build target, it still misses some standard ios libraries. for instance,

fatal error: 'UIKit/UIKit.h' file not found #import <UIKit/UIKit.h> ^~~~~~~~~~~~~~~ 1 error generated. Error in child process '/usr/bin/xcrun'. 1

tinder-kaijing avatar Jul 12 '24 20:07 tinder-kaijing