       if framework == "FirebaseCoreDiagnostics" {
         // FirebaseCoreDiagnostics needs to be built with a different ifdef for the Carthage distro.
         carthageThinArchives = buildFrameworksForAllPlatforms(withName: framework,
-                                                              logsDir: logsDir)
+                                                              logsDir: logsDir,
+                                                              setCarthage: true)
       } else {
         carthageThinArchives = slicedFrameworks
       }

  /// Build all thin slices for an open source pod.
  /// - Parameter framework: The name of the framework to be built.
  /// - Parameter logsDir: The path to the directory to place build logs.
  /// - Returns: A dictionary of URLs to the built thin libraries keyed by platform.
  private func buildFrameworksForAllPlatforms(withName framework: String,
                                              logsDir: URL) -> [TargetPlatform: URL] {
    // Build every architecture and save the locations in an array to be assembled.
    var slicedFrameworks = [TargetPlatform: URL]()
    for platform in platforms {

      let sliced = buildSlicedFramework(withName: framework,
                                        platform: platform,
                                        buildDir: buildDir,
                                        logRoot: logsDir,
                                        setCarthage: setCarthage)
      slicedFrameworks[platform] = sliced
    }
    return slicedFrameworks
