mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Bazel: reference (and locally stub) internal module
This commit is contained in:
@@ -22,7 +22,9 @@ CmakeInfo = provider(
|
||||
)
|
||||
|
||||
def _cmake_name(label):
|
||||
ret = ("%s_%s_%s" % (label.workspace_name, label.package, label.name)).replace("/", "_")
|
||||
# strip away the bzlmod module version for now
|
||||
workspace_name, _, _ = label.workspace_name.partition("~")
|
||||
ret = ("%s_%s_%s" % (workspace_name, label.package, label.name)).replace("/", "_")
|
||||
internal_transition_suffix = "_INTERNAL_TRANSITION"
|
||||
if ret.endswith(internal_transition_suffix):
|
||||
ret = ret[:-len(internal_transition_suffix)]
|
||||
@@ -120,7 +122,6 @@ def _cmake_aspect_impl(target, ctx):
|
||||
prefix, # source
|
||||
"${BAZEL_EXEC_ROOT}/%s/%s" % (ctx.var["BINDIR"], prefix), # generated
|
||||
]
|
||||
|
||||
deps = [dep[CmakeInfo] for dep in deps if CmakeInfo in dep]
|
||||
|
||||
# by the book this should be done with depsets, but so far the performance implication is negligible
|
||||
|
||||
@@ -19,8 +19,7 @@ endmacro()
|
||||
bazel(info workspace OUTPUT_VARIABLE BAZEL_WORKSPACE)
|
||||
|
||||
bazel(info output_base OUTPUT_VARIABLE BAZEL_OUTPUT_BASE)
|
||||
string(REPLACE "-" "_" BAZEL_EXEC_ROOT ${PROJECT_NAME})
|
||||
set(BAZEL_EXEC_ROOT ${BAZEL_OUTPUT_BASE}/execroot/${BAZEL_EXEC_ROOT})
|
||||
set(BAZEL_EXEC_ROOT ${BAZEL_OUTPUT_BASE}/execroot/_main)
|
||||
|
||||
macro(include_generated BAZEL_TARGET)
|
||||
bazel(build ${BAZEL_TARGET})
|
||||
|
||||
4
misc/bazel/codeql_internal_stub/MODULE.bazel
Normal file
4
misc/bazel/codeql_internal_stub/MODULE.bazel
Normal file
@@ -0,0 +1,4 @@
|
||||
module(
|
||||
name = "codeql_internal",
|
||||
version = "0.0",
|
||||
)
|
||||
0
misc/bazel/codeql_internal_stub/WORKSPACE.bazel
Normal file
0
misc/bazel/codeql_internal_stub/WORKSPACE.bazel
Normal file
Reference in New Issue
Block a user