From 1d7f2d37f7320fd9317e18cac443b0abba6d467c Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Fri, 31 Jan 2025 02:15:13 +0000 Subject: [PATCH] Do not pass empty object list to linker 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. --- tools/hxcpp/Linker.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/hxcpp/Linker.hx b/tools/hxcpp/Linker.hx index 1db3ef7b3..d65281d8f 100644 --- a/tools/hxcpp/Linker.hx +++ b/tools/hxcpp/Linker.hx @@ -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";