Skip to content

Commit

Permalink
feat(msvs): add support for CL env var
Browse files Browse the repository at this point in the history
  • Loading branch information
mscdex committed Nov 3, 2021
1 parent 33ff306 commit 30794de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pylib/gyp/generator/msvs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3466,6 +3466,8 @@ def _GetValueFormattedForMSBuild(tool_name, name, value):
formatted_value = char.join(
[MSVSSettings.ConvertVCMacrosToMSBuild(i) for i in value]
)
if tool_name == "ClCompile" and name == "AdditionalOptions":
formatted_value += os.environ.get("CL", "").replace("#", "=")
else:
formatted_value = MSVSSettings.ConvertVCMacrosToMSBuild(value)
return formatted_value
Expand Down
1 change: 1 addition & 0 deletions pylib/gyp/msvs_emulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,7 @@ def _ExtractImportantEnvironment(output_of_set):
"systemroot",
"temp",
"tmp",
"cl",
)
env = {}
# This occasionally happens and leads to misleading SYSTEMROOT error messages
Expand Down

0 comments on commit 30794de

Please sign in to comment.