mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Swift: rename autobuilder. NFC
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
load("@rules_pkg//:mappings.bzl", "pkg_attributes", "pkg_filegroup", "pkg_files", "strip_prefix")
|
||||
load("@rules_pkg//:mappings.bzl", "pkg_filegroup", "pkg_files", "strip_prefix")
|
||||
load("@rules_pkg//:install.bzl", "pkg_install")
|
||||
load("//:defs.bzl", "codeql_platform")
|
||||
load("//misc/bazel:pkg_runfiles.bzl", "pkg_runfiles")
|
||||
@@ -57,8 +57,8 @@ pkg_filegroup(
|
||||
)
|
||||
|
||||
pkg_runfiles(
|
||||
name = "xcode-autobuilder",
|
||||
srcs = ["//swift/xcode-autobuilder"],
|
||||
name = "swift-autobuilder",
|
||||
srcs = ["//swift/swift-autobuilder"],
|
||||
prefix = "tools/" + codeql_platform,
|
||||
)
|
||||
|
||||
@@ -93,7 +93,7 @@ pkg_filegroup(
|
||||
],
|
||||
}) + select({
|
||||
"@platforms//os:macos": [
|
||||
":xcode-autobuilder",
|
||||
":swift-autobuilder",
|
||||
],
|
||||
"//conditions:default": [
|
||||
":diagnostics",
|
||||
@@ -130,7 +130,7 @@ generate_cmake(
|
||||
"//swift/logging/tests/assertion-diagnostics:assert-false",
|
||||
] + select({
|
||||
"@platforms//os:linux": ["//swift/tools/diagnostics:autobuilder-incompatible-os"],
|
||||
"@platforms//os:macos": ["//swift/xcode-autobuilder"],
|
||||
"@platforms//os:macos": ["//swift/swift-autobuilder"],
|
||||
}),
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
load("//swift:rules.bzl", "swift_cc_binary")
|
||||
|
||||
swift_cc_binary(
|
||||
name = "xcode-autobuilder",
|
||||
name = "swift-autobuilder",
|
||||
srcs = glob([
|
||||
"*.cpp",
|
||||
"*.h",
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "swift/xcode-autobuilder/XcodeBuildRunner.h"
|
||||
#include "swift/swift-autobuilder/BuildRunner.h"
|
||||
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "absl/strings/str_join.h"
|
||||
|
||||
#include "swift/logging/SwiftLogging.h"
|
||||
#include "swift/xcode-autobuilder/CustomizingBuildLink.h"
|
||||
#include "swift/swift-autobuilder/CustomizingBuildLink.h"
|
||||
|
||||
constexpr codeql::SwiftDiagnostic buildCommandFailed{
|
||||
.id = "build-command-failed",
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "swift/xcode-autobuilder/XcodeTarget.h"
|
||||
#include "swift/xcode-autobuilder/XcodeProjectParser.h"
|
||||
#include "swift/swift-autobuilder/XcodeTarget.h"
|
||||
#include "swift/swift-autobuilder/ProjectParser.h"
|
||||
#include <filesystem>
|
||||
|
||||
void installDependencies(const ProjectStructure& target, bool dryRun);
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "swift/xcode-autobuilder/CFHelpers.h"
|
||||
#include "swift/swift-autobuilder/CFHelpers.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "swift/xcode-autobuilder/XcodeProjectParser.h"
|
||||
#include "swift/swift-autobuilder/ProjectParser.h"
|
||||
|
||||
#include <array>
|
||||
#include <iostream>
|
||||
@@ -8,8 +8,8 @@
|
||||
#include <fstream>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
#include "swift/xcode-autobuilder/XcodeWorkspaceParser.h"
|
||||
#include "swift/xcode-autobuilder/CFHelpers.h"
|
||||
#include "swift/swift-autobuilder/XcodeWorkspaceParser.h"
|
||||
#include "swift/swift-autobuilder/CFHelpers.h"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "swift/xcode-autobuilder/XcodeTarget.h"
|
||||
#include "swift/swift-autobuilder/XcodeTarget.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <filesystem>
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <iostream>
|
||||
#include "swift/xcode-autobuilder/XcodeWorkspaceParser.h"
|
||||
#include "swift/swift-autobuilder/XcodeWorkspaceParser.h"
|
||||
|
||||
/*
|
||||
Extracts FileRef locations from an XML of the following form:
|
||||
@@ -1,11 +1,11 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <filesystem>
|
||||
#include "swift/xcode-autobuilder/XcodeTarget.h"
|
||||
#include "swift/xcode-autobuilder/XcodeBuildRunner.h"
|
||||
#include "swift/xcode-autobuilder/XcodeProjectParser.h"
|
||||
#include "swift/swift-autobuilder/XcodeTarget.h"
|
||||
#include "swift/swift-autobuilder/BuildRunner.h"
|
||||
#include "swift/swift-autobuilder/ProjectParser.h"
|
||||
#include "swift/logging/SwiftLogging.h"
|
||||
#include "swift/xcode-autobuilder/CustomizingBuildLink.h"
|
||||
#include "swift/swift-autobuilder/CustomizingBuildLink.h"
|
||||
|
||||
static constexpr std::string_view uiTest = "com.apple.product-type.bundle.ui-testing";
|
||||
static constexpr std::string_view unitTest = "com.apple.product-type.bundle.unit-test";
|
||||
@@ -79,8 +79,9 @@ static bool autobuild(const CLIArgs& args) {
|
||||
"contain no Swift source files, or are tests.");
|
||||
return false;
|
||||
} else if (!structure.xcodeEncountered && swiftPackages.empty()) {
|
||||
DIAGNOSE_ERROR(noProjectFound,
|
||||
"`autobuild` detected neither an Xcode project or workspace, nor a Swift package");
|
||||
DIAGNOSE_ERROR(
|
||||
noProjectFound,
|
||||
"`autobuild` detected neither an Xcode project or workspace, nor a Swift package");
|
||||
return false;
|
||||
} else if (!xcodeTargets.empty()) {
|
||||
LOG_INFO("Building Xcode target: {}", xcodeTargets.front());
|
||||
@@ -4,11 +4,11 @@
|
||||
size = "small",
|
||||
srcs = ["autobuild_tester.py"],
|
||||
args = [
|
||||
"$(location //swift/xcode-autobuilder)",
|
||||
"$(location //swift/swift-autobuilder)",
|
||||
"$(location %s)" % test_dir,
|
||||
],
|
||||
data = [
|
||||
"//swift/xcode-autobuilder",
|
||||
"//swift/swift-autobuilder",
|
||||
test_dir,
|
||||
] + glob([test_dir + "/**/*"]),
|
||||
main = "autobuild_tester.py",
|
||||
Reference in New Issue
Block a user