mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Swift: fix cmake generation
The bazel -> cmake generator is currently not capable of handling separate included generated cmake files making use of common C/C++ dependencies. To work around this limitation, a single generated cmake is now in place. Long-term, we should either: * make the cmake generator handle common dependencies gracefully, or * make the cmake generation aspect travel up `pkg_` rules `srcs` attributes so to avoid having to list the targets to be generated in the top-level `BUILD` file. Other things fixed: * removed some warning spam about redefined `BAZEL_CURRENT_REPOSITORY` * fixed the final link step, that was failing because `libswiftCore.so` was not being linked.
This commit is contained in:
@@ -4,7 +4,7 @@ load("//misc/bazel/cmake:cmake.bzl", "generate_cmake")
|
||||
swift_cc_binary(
|
||||
name = "assert-false",
|
||||
srcs = ["AssertFalse.cpp"],
|
||||
visibility = ["//visibility:private"],
|
||||
visibility = ["//swift:__pkg__"],
|
||||
deps = [
|
||||
"//swift/logging",
|
||||
],
|
||||
@@ -14,12 +14,9 @@ py_test(
|
||||
name = "test",
|
||||
size = "small",
|
||||
srcs = ["test.py"],
|
||||
data = [
|
||||
"diagnostics.expected",
|
||||
":assert-false",
|
||||
],
|
||||
deps = ["//swift/integration-tests:integration_tests"],
|
||||
data = [":assert-false", "diagnostics.expected"],
|
||||
)
|
||||
|
||||
generate_cmake(
|
||||
name = "cmake",
|
||||
targets = [":assert-false"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user