rules_apple
rules_apple copied to clipboard
Can `build --enable_platform_specific_config` automatically detect the right APPLE_SDK_PLATFORM for build target?
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