File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -3614,13 +3614,12 @@ def _AddSources2(
3614
3614
extension_to_rule_name ,
3615
3615
_GetUniquePlatforms (spec ),
3616
3616
)
3617
- if group == "compile" :
3618
- # Always add an <ObjectFileName> value to support duplicate
3619
- # source file basenames.
3617
+ if group == "compile" and not os .path .isabs (source ):
3618
+ # Add an <ObjectFileName> value to support duplicate source
3619
+ # file basenames, except for absolute paths to avoid paths
3620
+ # with more than 260 characters.
3620
3621
file_name = os .path .splitext (source )[0 ] + ".obj"
3621
- if os .path .isabs (file_name ):
3622
- file_name = os .path .splitdrive (file_name )[1 ]
3623
- elif file_name .startswith ("..\\ " ):
3622
+ if file_name .startswith ("..\\ " ):
3624
3623
file_name = re .sub (r"^(\.\.\\)+" , "" , file_name )
3625
3624
elif file_name .startswith ("$(" ):
3626
3625
file_name = re .sub (r"^\$\([^)]+\)\\" , "" , file_name )
You can’t perform that action at this time.
0 commit comments