Skip to content

Commit 30794de

Browse files
committed
feat(msvs): add support for CL env var
1 parent 33ff306 commit 30794de

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

pylib/gyp/generator/msvs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3466,6 +3466,8 @@ def _GetValueFormattedForMSBuild(tool_name, name, value):
34663466
formatted_value = char.join(
34673467
[MSVSSettings.ConvertVCMacrosToMSBuild(i) for i in value]
34683468
)
3469+
if tool_name == "ClCompile" and name == "AdditionalOptions":
3470+
formatted_value += os.environ.get("CL", "").replace("#", "=")
34693471
else:
34703472
formatted_value = MSVSSettings.ConvertVCMacrosToMSBuild(value)
34713473
return formatted_value

pylib/gyp/msvs_emulation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,7 @@ def _ExtractImportantEnvironment(output_of_set):
11251125
"systemroot",
11261126
"temp",
11271127
"tmp",
1128+
"cl",
11281129
)
11291130
env = {}
11301131
# This occasionally happens and leads to misleading SYSTEMROOT error messages

0 commit comments

Comments
 (0)