Skip to content

Commit

Permalink
Do not pass empty object list to linker
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tobil4sk committed Jan 31, 2025
1 parent 54af892 commit 1d7f2d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/hxcpp/Linker.hx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ class Linker
}

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

0 comments on commit 1d7f2d3

Please sign in to comment.