File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 88gdextension_interface.h
99extension_api.json
1010
11+ # Build tools
1112/docs /* build /
12-
13-
13+ compile_commands.json
Original file line number Diff line number Diff line change @@ -121,6 +121,23 @@ opts.Add(
121121)
122122
123123
124+ opts .Add (
125+ BoolVariable (
126+ key = "compiledb" ,
127+ help = "Generate compilation DB (`compile_commands.json`) for external tools" ,
128+ default = env .get ("compiledb" , False ),
129+ )
130+ )
131+
132+ opts .Add (
133+ PathVariable (
134+ key = "compiledb_file" ,
135+ help = "Path to a custom `compile_commands.json` file" ,
136+ default = env .get ("compiledb_file" , "compile_commands.json" ),
137+ validator = build_utils .validate_parent_dir ,
138+ )
139+ )
140+
124141# for now there's no distinction between build targets, so always use template_release
125142env ['target' ] = 'template_release'
126143
@@ -267,6 +284,9 @@ env.Alias("archive_importer_r_string", [
267284 )
268285])
269286
287+ env .Tool ("compilation_db" )
288+ env .Alias ("compiledb" , env .CompilationDatabase (build_utils .normalize_path (env ["compiledb_file" ], env )))
289+
270290if not env .get ('skip_module_embed' , False ):
271291 # pkg_files = Install('src', files)
272292 godot_zip = Zip (
You can’t perform that action at this time.
0 commit comments