Skip to content

Commit 48607e3

Browse files
committed
Swift: address code review comments
1 parent b98a966 commit 48607e3

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

swift/xcode-autobuilder/XcodeBuildRunner.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,13 @@ static bool run_build_command(const std::vector<std::string>& argv, bool dryRun)
5959
DIAGNOSE_ERROR(buildCommandFailed,
6060
"`autobuild` failed to run the build command:\n\n```\n{}\n```",
6161
absl::StrJoin(argv, " "));
62-
codeql::Log::flush();
6362
return false;
6463
}
6564
}
6665
return true;
6766
}
6867

69-
bool buildXcodeTarget(XcodeTarget& target, bool dryRun) {
68+
bool buildXcodeTarget(const XcodeTarget& target, bool dryRun) {
7069
std::vector<std::string> argv({"/usr/bin/xcodebuild", "build"});
7170
if (!target.workspace.empty()) {
7271
argv.push_back("-workspace");
@@ -103,7 +102,7 @@ static void carthage_install(const std::string& carthage,
103102
run_build_command(argv, dryRun);
104103
}
105104

106-
void installDependencies(ProjectStructure& target, bool dryRun) {
105+
void installDependencies(const ProjectStructure& target, bool dryRun) {
107106
auto pod = std::string(getenv("CODEQL_SWIFT_POD_EXEC") ?: "");
108107
auto carthage = std::string(getenv("CODEQL_SWIFT_CARTHAGE_EXEC") ?: "");
109108
if (!pod.empty() && !target.podfiles.empty()) {

swift/xcode-autobuilder/XcodeBuildRunner.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
#include "swift/xcode-autobuilder/XcodeProjectParser.h"
55
#include <filesystem>
66

7-
void installDependencies(ProjectStructure& target, bool dryRun);
8-
bool buildXcodeTarget(XcodeTarget& target, bool dryRun);
7+
void installDependencies(const ProjectStructure& target, bool dryRun);
8+
bool buildXcodeTarget(const XcodeTarget& target, bool dryRun);
99
bool buildSwiftPackage(const std::filesystem::path& packageFile, bool dryRun);

0 commit comments

Comments
 (0)