Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use an SDKRoot based Foundation framework
Summary: When building `igios-no-extensions` with buck2 on linux, we the following analysis error: ``` When running analysis for `fbsource//fbobjc/Apps/Instagram/Instagram:InstagramNoExtensions (fbsource//tools/build_defs/config/platform/apple:Instagram-125ae32099392ce8)` Caused by: 0: When running analysis for `fbsource//fbobjc/Apps/Instagram/Instagram:InstagramARVRFrameworkDylibFramework (fbsource//tools/build_defs/config/platform/apple:Instagram-125ae32099392ce8)` 1: When running analysis for `fbsource//fbobjc/Apps/Instagram/Instagram:InstagramDependencyPoolForLinkGroupsFramework (fbsource//tools/build_defs/config/platform/apple:Instagram-125ae32099392ce8)` 2: When running analysis for `fbsource//fbobjc/Libraries/FBReactKit:RCTNetInfo (fbsource//tools/build_defs/config/platform/apple:Instagram-125ae32099392ce8)` 3: When running analysis for `fbsource//xplat/js/RKJSModules/Libraries/NetInfo:FBReactNativeNetInfoSpecApple (fbsource//tools/build_defs/config/platform/apple:Instagram-125ae32099392ce8)` 4: When running analysis for `fbsource//xplat/js/react-native-github:RCTTypeSafety (fbsource//tools/build_defs/config/platform/apple:Instagram-125ae32099392ce8)` 5: Traceback (most recent call last): * fbcode/buck2/prelude/apple/apple_library.bzl:48, in <module> constructor_params, swift_providers = apple_library_rule_constructor_params_a... * fbcode/buck2/prelude/apple/apple_library.bzl:111, in apple_library_rule_constructor_params_and_swift_providers args = [cmd_args(get_framework_search_path_flags(ctx))], * fbcode/buck2/prelude/apple/apple_frameworks.bzl:46, in get_framework_search_path_flags return _get_framework_search_path_flags(_get_non_sdk_framework_directories(ct... * fbcode/buck2/prelude/apple/apple_frameworks.bzl:59, in _get_non_sdk_framework_directories return dedupe(filter(None, [_non_sdk_framework_directory(ctx, x) for x in fra... * fbcode/buck2/prelude/apple/apple_frameworks.bzl:95, in _non_sdk_framework_directory expanded_framework_path = _expand_sdk_framework_path(ctx, framework_path) * fbcode/buck2/prelude/apple/apple_frameworks.bzl:81, in _expand_sdk_framework_path expanded_path = expanded_path.replace(path_variable, path_value) error: Type of parameter `new` doesn't match, expected `str`, actual `artifact` --> fbcode/buck2/prelude/apple/apple_frameworks.bzl:81:25 | 81 | expanded_path = expanded_path.replace(path_variable, path_value) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ``` This is related to running on Linux with buck2 and how we get the framework paths for linux/pika toolchains for non SDK frameworks. However, Foundation is an SDK framework, and updating it to be as such allows us to build, both with buck1 and buck2. Differential Revision: D38080376 fbshipit-source-id: b226c3511e3312d0bf0ddb792dbe4ca99768cad1
- Loading branch information