Skip to content

Commit bfa81c3

Browse files
authored
Fix bazel formatting and non-windows build of canonicalize-dll
1 parent c807858 commit bfa81c3

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

go/BUILD.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ codeql_pkg_files(
5858

5959
codeql_pkg_files(
6060
name = "canonicalize-dll",
61-
srcs = ["//shared/canonicalize:pkg"],
61+
srcs = select({
62+
"@platforms//os:windows": ["//shared/canonicalize:pkg"],
63+
"//conditions:default": [],
64+
}),
6265
prefix = "tools/{CODEQL_PLATFORM}",
6366
)
6467

shared/canonicalize/BUILD.bazel

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files")
33

44
cc_binary(
55
name = "codeql_canonical_path.dll",
6-
srcs = ["canonicalize.cpp", "canonicalize_jni.cpp", "canonicalize.h"],
6+
srcs = [
7+
"canonicalize.cpp",
8+
"canonicalize.h",
9+
"canonicalize_jni.cpp",
10+
],
711
defines = ["CODEQL_CANONICALIZE_EXPORTS"],
812
linkopts = ["-lkernel32"],
913
linkshared = True,
1014
target_compatible_with = ["@platforms//os:windows"],
11-
deps = ["@rules_java//toolchains:jni"],
1215
visibility = ["//visibility:public"],
16+
deps = ["@rules_java//toolchains:jni"],
1317
)
1418

1519
cc_library(

0 commit comments

Comments
 (0)