0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-21 12:39:08 +01:00

SERVER-97283 fix scons compiledb (#29363)

GitOrigin-RevId: ec365e57d2ea39b3b40efb3ffe0bef2d57eb7574
This commit is contained in:
Daniel Moody 2024-11-19 14:30:04 -05:00 committed by MongoDB Bot
parent fc161a8e3d
commit c67a3df2aa
2 changed files with 6 additions and 2 deletions

View File

@ -43,6 +43,7 @@ refresh_compile_commands(
name = "compiledb",
exclude_external_sources = True,
exclude_headers = "all", # not using "all" adds headers as sources to compile_commands.json which is never what we want
tags = ["compiledb"],
targets = {
"//src/...": "",
},

View File

@ -440,9 +440,12 @@ def bazel_build_thread_func(env, log_dir: str, verbose: bool, ninja_generate: bo
for file in glob.glob("bazel-out/**/*.gen_source_list", recursive=True):
os.remove(file)
extra_args += ["--build_tag_filters=scons_link_lists"]
bazel_cmd = Globals.bazel_base_build_command + extra_args + ["//src/..."]
elif SCons.Script.BUILD_TARGETS == ["compiledb"]:
extra_args += ["--build_tag_filters=scons_link_lists,compiledb,gen_source"]
bazel_cmd = Globals.bazel_base_build_command + extra_args + ["//:compiledb", "//src/..."]
if SCons.Script.BUILD_TARGETS == ["compiledb"]:
bazel_cmd = Globals.bazel_base_build_command + extra_args + ["//:compiledb"]
else:
bazel_cmd = Globals.bazel_base_build_command + extra_args + ["//src/..."]