From 89cc9e470905ca9227d36105910ebcb5fbab9c11 Mon Sep 17 00:00:00 2001 From: Segev Finer Date: Tue, 2 Apr 2024 11:45:03 +0300 Subject: [PATCH] Update pylib/gyp/generator/compile_commands_json.py Co-authored-by: Christian Clauss --- pylib/gyp/generator/compile_commands_json.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pylib/gyp/generator/compile_commands_json.py b/pylib/gyp/generator/compile_commands_json.py index 8a81c022..f84c981d 100644 --- a/pylib/gyp/generator/compile_commands_json.py +++ b/pylib/gyp/generator/compile_commands_json.py @@ -115,8 +115,7 @@ def GenerateOutput(target_list, target_dicts, data, params): output_dir = params["options"].generator_output except (AttributeError, KeyError): pass - if output_dir is None: - output_dir = params["generator_flags"].get("output_dir", "out") + output_dir = output_dir or params["generator_flags"].get("output_dir", "out") for configuration_name, commands in per_config_commands.items(): filename = os.path.join(output_dir, configuration_name, "compile_commands.json") gyp.common.EnsureDirExists(filename)