private List<String> commonLinkAndCompileFlagsForClang(
      ObjcProvider provider, ObjcConfiguration objcConfiguration,
      AppleConfiguration appleConfiguration) {
    ImmutableList.Builder<String> builder = new ImmutableList.Builder<>();
    Platform platform = appleConfiguration.getSingleArchPlatform();
    switch (platform) {
      case IOS_SIMULATOR:
        builder.add("-mios-simulator-version-min="
            + appleConfiguration.getMinimumOsForPlatformType(platform.getType()));
        break;
      case IOS_DEVICE:
        builder.add("-miphoneos-version-min="
            + appleConfiguration.getMinimumOsForPlatformType(platform.getType()));
        break;
      case WATCHOS_SIMULATOR:
        // TODO(bazel-team): Use the value from --watchos-minimum-os instead of tying to the SDK
        // version.
        builder.add("-mwatchos-simulator-version-min="
            + appleConfiguration.getSdkVersionForPlatform(platform));
        break;
      case WATCHOS_DEVICE:
        // TODO(bazel-team): Use the value from --watchos-minimum-os instead of tying to the SDK
        // version.
        builder.add("-mwatchos-version-min="
            + appleConfiguration.getSdkVersionForPlatform(platform));
        break;
      case TVOS_SIMULATOR:
        builder.add("-mtvos-simulator-version-min="
            + appleConfiguration.getMinimumOsForPlatformType(platform.getType()));
        break;
      case TVOS_DEVICE:
        builder.add("-mtvos-version-min="
            + appleConfiguration.getMinimumOsForPlatformType(platform.getType()));
        break;
      default:
        throw new IllegalArgumentException("Unhandled platform " + platform);
    }
    if (objcConfiguration.generateDsym()) {
      builder.add("-g");
    }
    return builder
        .add("-arch", appleConfiguration.getSingleArchitecture())
        .add("-isysroot", AppleToolchain.sdkDir())
        // TODO(bazel-team): Pass framework search paths to Xcodegen.
        .addAll(commonFrameworkFlags(provider, appleConfiguration))
        .build();
  }
private List<String> commonLinkAndCompileFlagsForClang(
      ObjcProvider provider, ObjcConfiguration objcConfiguration,
      AppleConfiguration appleConfiguration) {
    ImmutableList.Builder<String> builder = new ImmutableList.Builder<>();
    Platform platform = appleConfiguration.getSingleArchPlatform();
    switch (platform) {
      case IOS_SIMULATOR:
        builder.add("-mios-simulator-version-min="
            + appleConfiguration.getMinimumOsForPlatformType(platform.getType()));
        break;
      case IOS_DEVICE:
        builder.add("-miphoneos-version-min="
            + appleConfiguration.getMinimumOsForPlatformType(platform.getType()));
        break;
      case WATCHOS_SIMULATOR:
       
       
        builder.add("-mwatchos-simulator-version-min="
            + appleConfiguration.getSdkVersionForPlatform(platform));
        break;
      case WATCHOS_DEVICE:
       
       
        builder.add("-mwatchos-version-min="
            + appleConfiguration.getSdkVersionForPlatform(platform));
        break;
      case TVOS_SIMULATOR:
        builder.add("-mtvos-simulator-version-min="
            + appleConfiguration.getMinimumOsForPlatformType(platform.getType()));
        break;
      case TVOS_DEVICE:
        builder.add("-mtvos-version-min="
            + appleConfiguration.getMinimumOsForPlatformType(platform.getType()));
        break;
      default:
        throw new IllegalArgumentException("Unhandled platform " + platform);
    }
    if (objcConfiguration.generateDsym()) {
      builder.add("-g");
    }
    return builder
        .add("-arch", appleConfiguration.getSingleArchitecture())
        .add("-isysroot", AppleToolchain.sdkDir())
       
        .addAll(commonFrameworkFlags(provider, appleConfiguration))
        .build();
  }
private list<string> commonlinkandcompileflagsforclang( objcprovider provider, objcconfiguration objcconfiguration, appleconfiguration appleconfiguration) { immutablelist.builder<string> builder = new immutablelist.builder<>(); platform platform = appleconfiguration.getsinglearchplatform(); switch (platform) { case ios_simulator: builder.add("-mios-simulator-version-min=" + appleconfiguration.getminimumosforplatformtype(platform.gettype())); break; case ios_device: builder.add("-miphoneos-version-min=" + appleconfiguration.getminimumosforplatformtype(platform.gettype())); break; case watchos_simulator: builder.add("-mwatchos-simulator-version-min=" + appleconfiguration.getsdkversionforplatform(platform)); break; case watchos_device: builder.add("-mwatchos-version-min=" + appleconfiguration.getsdkversionforplatform(platform)); break; case tvos_simulator: builder.add("-mtvos-simulator-version-min=" + appleconfiguration.getminimumosforplatformtype(platform.gettype())); break; case tvos_device: builder.add("-mtvos-version-min=" + appleconfiguration.getminimumosforplatformtype(platform.gettype())); break; default: throw new illegalargumentexception("unhandled platform " + platform); } if (objcconfiguration.generatedsym()) { builder.add("-g"); } return builder .add("-arch", appleconfiguration.getsinglearchitecture()) .add("-isysroot", appletoolchain.sdkdir()) .addall(commonframeworkflags(provider, appleconfiguration)) .build(); }