@@ -3440,6 +3440,24 @@ def _FinalizeMSBuildSettings(spec, configuration):
34403440
34413441
34423442def _GetValueFormattedForMSBuild (tool_name , name , value ):
3443+ """
3444+ >>> _GetValueFormattedForMSBuild(
3445+ ... tool_name="tool_name", name="name", value=[]
3446+ ... )
3447+ ''
3448+ >>> _GetValueFormattedForMSBuild(
3449+ ... tool_name="tool_name", name="name", value=["DelayLoadDLLs"]
3450+ ... )
3451+ 'DelayLoadDLLs'
3452+ >>> _GetValueFormattedForMSBuild(
3453+ ... tool_name="Lib", name="AdditionalOptions", value=["DelayLoadDLLs"]
3454+ ... )
3455+ 'DelayLoadDLLs %(AdditionalOptions)'
3456+ >>> _GetValueFormattedForMSBuild(
3457+ ... tool_name="ClCompile", name="AdditionalOptions", value=["DelayLoadDLLs"]
3458+ ... )
3459+ 'DelayLoadDLLs %(AdditionalOptions)'
3460+ """
34433461 if type (value ) == list :
34443462 # For some settings, VS2010 does not automatically extends the settings
34453463 # TODO(jeanluc) Is this what we want?
@@ -3466,6 +3484,8 @@ def _GetValueFormattedForMSBuild(tool_name, name, value):
34663484 formatted_value = char .join (
34673485 [MSVSSettings .ConvertVCMacrosToMSBuild (i ) for i in value ]
34683486 )
3487+ if tool_name == "ClCompile" and name == "AdditionalOptions" :
3488+ formatted_value += os .environ .get ("CL" , "" ).replace ("#" , "=" )
34693489 else :
34703490 formatted_value = MSVSSettings .ConvertVCMacrosToMSBuild (value )
34713491 return formatted_value
0 commit comments