Skip to content

Commit c9b8a10

Browse files
committed
Add workaround for hxcpp compiler cache bug
See: HaxeFoundation/hxcpp#1180
1 parent a0065ff commit c9b8a10

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

templates/ios/template/{{app.file}}/haxe/makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ $(HAXE_BUILDS): build-haxe-%:
5959
-options Options.txt $(DEBUG)
6060
touch ../Classes/Main.mm
6161
cd build/$(CONFIG)$(SUFFIX_$*); ::HAXELIB_PATH:: export HXCPP_NO_COLOR=1; \
62-
haxelib run ::CPP_BUILD_LIBRARY:: $(CURDIR)/BuildHxcppMbedtls.xml \
62+
::CPP_CACHE_WORKAROUND:: haxelib run ::CPP_BUILD_LIBRARY:: $(CURDIR)/BuildHxcppMbedtls.xml \
6363
-Ddestination=$(CURDIR)/../lib/$*$(LIB_MBEDTLS_DEST) \
6464
-options $(CURDIR)/build/$(CONFIG)$(SUFFIX_$*)/Options.txt $(DEBUG)
6565

templates/tvos/PROJ/haxe/makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ $(HAXE_BUILDS): build-haxe-%:
5353
-options Options.txt $(DEBUG)
5454
touch ../Classes/Main.mm
5555
cd build/$(CONFIG)$(SUFFIX_$*); ::HAXELIB_PATH:: export HXCPP_NO_COLOR=1; \
56-
haxelib run ::CPP_BUILD_LIBRARY:: $(CURDIR)/BuildHxcppMbedtls.xml \
56+
::CPP_CACHE_WORKAROUND:: haxelib run ::CPP_BUILD_LIBRARY:: $(CURDIR)/BuildHxcppMbedtls.xml \
5757
-Ddestination=$(CURDIR)/../lib/$*$(LIB_MBEDTLS_DEST) \
5858
-options $(CURDIR)/build/$(CONFIG)$(SUFFIX_$*)/Options.txt $(DEBUG)
5959

tools/platforms/IOSPlatform.hx

+2
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,8 @@ class IOSPlatform extends PlatformTarget
331331
context.IOS_COMPILER = project.config.getString("ios.compiler", "clang");
332332
context.CPP_BUILD_LIBRARY = project.config.getString("cpp.buildLibrary", "hxcpp");
333333

334+
context.CPP_CACHE_WORKAROUND = "unset HXCPP_COMPILE_CACHE;";
335+
334336
context.IOS_LINKER_FLAGS = ["-stdlib=libc++"].concat(project.config.getArrayString("ios.linker-flags"));
335337
context.IOS_NON_EXEMPT_ENCRYPTION = project.config.getBool("ios.non-exempt-encryption", false);
336338

tools/platforms/TVOSPlatform.hx

+2
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ class TVOSPlatform extends PlatformTarget
262262
context.IOS_COMPILER = project.config.getString("tvos.compiler", "clang");
263263
context.CPP_BUILD_LIBRARY = project.config.getString("cpp.buildLibrary", "hxcpp");
264264

265+
context.CPP_CACHE_WORKAROUND = "unset HXCPP_COMPILE_CACHE;";
266+
265267
context.IOS_LINKER_FLAGS = ["-stdlib=libc++"].concat(project.config.getArrayString("tvos.linker-flags"));
266268
context.IOS_NON_EXEMPT_ENCRYPTION = project.config.getBool("tvos.non-exempt-encryption", true);
267269

0 commit comments

Comments
 (0)