Skip to content

Commit

Permalink
Add workaround for hxcpp compiler cache bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tobil4sk committed Jan 23, 2025
1 parent a0065ff commit c9b8a10
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/ios/template/{{app.file}}/haxe/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ $(HAXE_BUILDS): build-haxe-%:
-options Options.txt $(DEBUG)
touch ../Classes/Main.mm
cd build/$(CONFIG)$(SUFFIX_$*); ::HAXELIB_PATH:: export HXCPP_NO_COLOR=1; \
haxelib run ::CPP_BUILD_LIBRARY:: $(CURDIR)/BuildHxcppMbedtls.xml \
::CPP_CACHE_WORKAROUND:: haxelib run ::CPP_BUILD_LIBRARY:: $(CURDIR)/BuildHxcppMbedtls.xml \
-Ddestination=$(CURDIR)/../lib/$*$(LIB_MBEDTLS_DEST) \
-options $(CURDIR)/build/$(CONFIG)$(SUFFIX_$*)/Options.txt $(DEBUG)

Expand Down
2 changes: 1 addition & 1 deletion templates/tvos/PROJ/haxe/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ $(HAXE_BUILDS): build-haxe-%:
-options Options.txt $(DEBUG)
touch ../Classes/Main.mm
cd build/$(CONFIG)$(SUFFIX_$*); ::HAXELIB_PATH:: export HXCPP_NO_COLOR=1; \
haxelib run ::CPP_BUILD_LIBRARY:: $(CURDIR)/BuildHxcppMbedtls.xml \
::CPP_CACHE_WORKAROUND:: haxelib run ::CPP_BUILD_LIBRARY:: $(CURDIR)/BuildHxcppMbedtls.xml \
-Ddestination=$(CURDIR)/../lib/$*$(LIB_MBEDTLS_DEST) \
-options $(CURDIR)/build/$(CONFIG)$(SUFFIX_$*)/Options.txt $(DEBUG)

Expand Down
2 changes: 2 additions & 0 deletions tools/platforms/IOSPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ class IOSPlatform extends PlatformTarget
context.IOS_COMPILER = project.config.getString("ios.compiler", "clang");
context.CPP_BUILD_LIBRARY = project.config.getString("cpp.buildLibrary", "hxcpp");

context.CPP_CACHE_WORKAROUND = "unset HXCPP_COMPILE_CACHE;";

context.IOS_LINKER_FLAGS = ["-stdlib=libc++"].concat(project.config.getArrayString("ios.linker-flags"));
context.IOS_NON_EXEMPT_ENCRYPTION = project.config.getBool("ios.non-exempt-encryption", false);

Expand Down
2 changes: 2 additions & 0 deletions tools/platforms/TVOSPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ class TVOSPlatform extends PlatformTarget
context.IOS_COMPILER = project.config.getString("tvos.compiler", "clang");
context.CPP_BUILD_LIBRARY = project.config.getString("cpp.buildLibrary", "hxcpp");

context.CPP_CACHE_WORKAROUND = "unset HXCPP_COMPILE_CACHE;";

context.IOS_LINKER_FLAGS = ["-stdlib=libc++"].concat(project.config.getArrayString("tvos.linker-flags"));
context.IOS_NON_EXEMPT_ENCRYPTION = project.config.getBool("tvos.non-exempt-encryption", true);

Expand Down

0 comments on commit c9b8a10

Please sign in to comment.