             path: inputPath,
             url: baseURL,
             version: version,
-            interpreterFlags: parseResult.interpreterFlags,
+            interpreterFlags: interpreterFlags(for: manifestVersion),
             manifestVersion: manifestVersion,
             pkgConfig: manifestBuilder.pkgConfig,
             providers: manifestBuilder.providers,

                manifestVersion: manifestVersion)
        }

        // Validate that the file exists.
        guard isFile(inputPath) else {
            throw PackageModel.Package.Error.noManifest(baseURL: baseURL, version: version?.description)
        }

        // Get the json from manifest.
        let parseResult = try parse(path: inputPath, manifestVersion: manifestVersion)

        let json = try JSON(string: parseResult.jsonString)

        // Load the manifest from JSON.
        let manifestBuilder = try ManifestBuilder(v4: json, baseURL: baseURL)

            throw ManifestParseError.invalidEncoding
        }

        return json
    }

    /// Returns path to the sdk, if possible.
