Skip to content

Commit 3acb855

Browse files
authored
Do not pass empty object list to linker (#1184)
This situation may arise in some situations with the compile cache enabled. Some linkers (such as libtool on mac) throw an error if an object list is empty, so it is not safe to pass it in.
1 parent 7262a23 commit 3acb855

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/hxcpp/Linker.hx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ class Linker
251251
}
252252

253253
// Place list of obj files in a file called "all_objs"
254-
if (mFromFile!="")
254+
// In some situations with the compile cache, we might have an empty list
255+
if (mFromFile!="" && objs.length!=0)
255256
{
256257
PathManager.mkdir(tmpDir);
257258
var fname = tmpDir + "/all_objs";

0 commit comments

Comments
 (0)