File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -62,14 +62,14 @@ function RegisterExtractorPack(id)
6262 -- resource-dir in this case by skipping over the -Xcc that follows it and stripping off the
6363 -- clang suffix from the path.
6464 function find_original_resource_dir (compilerPath , args )
65- local resource_dir_index = indexOf (args , ' -resource-dir' )
66- if resource_dir_index then
67- if args [resource_dir_index + 1 ] and args [ resource_dir_index + 1 ] ~= ' -Xcc' then
68- return args [resource_dir_index + 1 ]
69- elseif args [resource_dir_index + 2 ] then
70- local clang_index = string.find (args [resource_dir_index + 2 ], " /clang$" )
65+ local found = indexOf (args , ' -resource-dir' )
66+ if found and args [ found + 1 ] then
67+ if args [found - 1 ] ~= ' -Xcc' then
68+ return args [found + 1 ]
69+ elseif args [found + 1 ] == ' -Xcc ' and args [ found + 2 ] then
70+ local clang_index = string.find (args [found + 2 ], " /clang$" )
7171 if clang_index and clang_index - 1 > 0 then
72- return string.sub (args [resource_dir_index + 2 ], 1 , clang_index - 1 )
72+ return string.sub (args [found + 2 ], 1 , clang_index - 1 )
7373 end
7474 end
7575 end
You can’t perform that action at this time.
0 commit comments