Open tinder-kaijing opened 1 month ago
As far as I understand --enable_platform_specific_config is for the host machine not the specific platform target.
You'd still need to use --apple_platform_type=ios
if you want to build swift_library
for iOS or use the packaging rules like ios_framework
This was recently documented to be more clear in rules_swift
: https://github.com/bazelbuild/rules_swift/blob/master/doc/faq.md
Also FWIW in Bazel 7 you should not need the flags you listed in the .bazelrc
(that was only required for Bazel 6):
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
See: https://github.com/bazelbuild/apple_support?tab=readme-ov-file#bazel-7-setup
As far as I understand --enable_platform_specific_config is for the host machine not the specific platform target.
You'd still need to use
--apple_platform_type=ios
if you want to buildswift_library
for iOS or use the packaging rules likeios_framework
This was recently documented to be more clear in
rules_swift
: https://github.com/bazelbuild/rules_swift/blob/master/doc/faq.md
Thanks.
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 isios_arm64
, it will include all ios standard libraries. If the build target is "macos_arm64", it will include all macOS libraries.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