File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -760,13 +760,17 @@ def _all_platform_patch(compile_args: typing.List[str]):
760
760
new_compile_args .append (arg )
761
761
compile_args = new_compile_args
762
762
763
- # replace ccache with the actual compiler
764
- compiler_path = os .readlink (compile_args [0 ])
765
- if compiler_path .endswith ("ccache" ):
766
- compiler = os .path .basename (compile_args [0 ])
767
- real_compiler_path = shutil .which (compiler )
768
- if real_compiler_path :
769
- compile_args [0 ] = real_compiler_path
763
+ # Discover compilers that are actually symlinks to ccache--and replace them with the underlying compiler
764
+ try :
765
+ compiler_path = os .readlink (compile_args [0 ])
766
+ except OSError :
767
+ pass
768
+ else :
769
+ if compiler_path .endswith ("ccache" ):
770
+ compiler = os .path .basename (compile_args [0 ])
771
+ real_compiler_path = shutil .which (compiler )
772
+ if real_compiler_path :
773
+ compile_args [0 ] = real_compiler_path
770
774
771
775
# Any other general fixes would go here...
772
776
You can’t perform that action at this time.
0 commit comments