Skip to content

Commit

Permalink
fix: use generator_output as output_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
meixg committed Mar 9, 2023
1 parent 2f79158 commit 8845cfd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pylib/gyp/generator/compile_commands_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def CalculateVariables(default_variables, params):


def AddCommandsForTarget(cwd, target, params, per_config_commands):
output_dir = params["generator_flags"].get("output_dir", "out")
for configuration_name, configuration in target["configurations"].items():
if IsMac(params):
xcode_settings = gyp.xcode_emulation.XcodeSettings(target)
Expand Down Expand Up @@ -93,7 +92,7 @@ def resolve(filename):
gyp.common.EncodePOSIXShellArgument(file),
)
)
commands.append(dict(command=command, directory=output_dir, file=file))
commands.append(dict(command=command, file=file))


def GenerateOutput(target_list, target_dicts, data, params):
Expand All @@ -108,7 +107,7 @@ def GenerateOutput(target_list, target_dicts, data, params):
cwd = os.path.dirname(build_file)
AddCommandsForTarget(cwd, target, params, per_config_commands)

output_dir = params["generator_flags"].get("output_dir", "out")
output_dir = params["options"].generator_output
for configuration_name, commands in per_config_commands.items():
filename = os.path.join(output_dir, configuration_name, "compile_commands.json")
gyp.common.EnsureDirExists(filename)
Expand Down

0 comments on commit 8845cfd

Please sign in to comment.