Skip to content

Commit

Permalink
Bug 1829512 - Generate compile db for non-VSCode editors too. r=andi
Browse files Browse the repository at this point in the history
It's useful for virtually all editors.
Also it works with Android builds, so remove that condition.

Differential Revision: https://phabricator.services.mozilla.com/D176225
  • Loading branch information
emilio committed Apr 23, 2023
1 parent b972ec1 commit f17e2f8
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions moz.configure
Original file line number Diff line number Diff line change
Expand Up @@ -361,19 +361,16 @@ imply_option("--build-backends", build_backend)
target,
"--enable-artifact-builds",
"--disable-compile-environment",
"--enable-build-backend",
"--enable-project",
"--enable-application",
"--help",
)
@imports("sys")
@imports(_from="mozbuild.backend.clangd", _import="find_vscode_cmd")
def build_backend_defaults(
host,
target,
artifact_builds,
compile_environment,
requested_backends,
project,
application,
_,
Expand All @@ -383,11 +380,7 @@ def build_backend_defaults(
elif project:
project = project[0]

if "Tup" in requested_backends:
# As a special case, if Tup was requested, do not combine it with any
# Make based backend by default.
all_backends = []
elif artifact_builds:
if artifact_builds:
all_backends = ["FasterMake+RecursiveMake"]
else:
all_backends = ["RecursiveMake", "FasterMake"]
Expand All @@ -398,11 +391,7 @@ def build_backend_defaults(
and project not in ("mobile/android", "memory", "tools/update-programs")
):
all_backends.append("VisualStudio")
if (
compile_environment
and find_vscode_cmd()
and project not in ("mobile/android", "memory", "tools/update-programs")
):
if compile_environment and project not in ("memory", "tools/update-programs"):
all_backends.append("Clangd")
return tuple(all_backends) or None

Expand Down

0 comments on commit f17e2f8

Please sign in to comment.