diff --git a/.gitmodules b/.gitmodules
index a04e05369..e6c98e540 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -58,3 +58,6 @@
[submodule "project/lib/mbedtls"]
path = project/lib/mbedtls
url = https://github.com/native-toolkit/mbedtls
+[submodule "project/lib/mojoal"]
+ path = project/lib/mojoal
+ url = https://github.com/native-toolkit/mojoal
diff --git a/lime/tools/platforms/WindowsPlatform.hx b/lime/tools/platforms/WindowsPlatform.hx
index ebf223ba6..74f02863d 100644
--- a/lime/tools/platforms/WindowsPlatform.hx
+++ b/lime/tools/platforms/WindowsPlatform.hx
@@ -200,7 +200,7 @@ class WindowsPlatform extends PlatformTarget {
if (noOutput) return;
- FileHelper.copyFile (targetDirectory + "/obj/ApplicationMain" + (project.debug ? "-Debug" : "") + ".hl", PathHelper.combine (applicationDirectory, project.app.file + ".hl"));
+ FileHelper.copyFile (targetDirectory + "/obj/ApplicationMain.hl", PathHelper.combine (applicationDirectory, project.app.file + ".hl"));
} else if (targetType == "nodejs") {
diff --git a/project/Build.xml b/project/Build.xml
index fc351db36..5e3b0e52a 100644
--- a/project/Build.xml
+++ b/project/Build.xml
@@ -23,8 +23,11 @@
+
+
+
@@ -125,11 +128,16 @@
+
+
@@ -169,10 +177,12 @@
-
+
+
-
+
+
@@ -325,6 +335,7 @@
+
@@ -357,6 +368,7 @@
+
diff --git a/project/include/hl.h b/project/include/hl.h
index ed674e841..fb47080cc 100644
--- a/project/include/hl.h
+++ b/project/include/hl.h
@@ -643,13 +643,13 @@ HL_API void hl_thread_yield(void);
HL_API void hl_register_thread( void *stack_top );
HL_API void hl_unregister_thread( void );
-HL_API hl_mutex *hl_mutex_alloc( void );
+HL_API hl_mutex *hl_mutex_alloc( bool gc_thread );
HL_API void hl_mutex_acquire( hl_mutex *l );
HL_API bool hl_mutex_try_acquire( hl_mutex *l );
HL_API void hl_mutex_release( hl_mutex *l );
HL_API void hl_mutex_free( hl_mutex *l );
-HL_API hl_tls *hl_tls_alloc( void );
+HL_API hl_tls *hl_tls_alloc( bool gc_value );
HL_API void hl_tls_set( hl_tls *l, void *value );
HL_API void *hl_tls_get( hl_tls *l );
HL_API void hl_tls_free( hl_tls *l );
@@ -773,6 +773,12 @@ typedef struct {
# define DEFINE_PRIM_WITH_NAME _DEFINE_PRIM_WITH_NAME
#endif
+#if defined(HL_GCC) && !defined(HL_CONSOLE)
+# define HL_NO_OPT __attribute__((optimize("-O0")))
+#else
+# define HL_NO_OPT
+#endif
+
// -------------- EXTRA ------------------------------------
#define hl_fatal(msg) hl_fatal_error(msg,__FILE__,__LINE__)
@@ -798,6 +804,7 @@ struct _hl_trap_ctx {
#define HL_EXC_RETHROW 1
#define HL_EXC_CATCH_ALL 2
#define HL_EXC_IS_THROW 4
+#define HL_TRACK_DISABLE 8
typedef struct {
int thread_id;
@@ -821,4 +828,4 @@ HL_API hl_thread_info *hl_get_thread();
C_FUNCTION_END
-#endif
\ No newline at end of file
+#endif
diff --git a/project/lib/mojoal b/project/lib/mojoal
new file mode 160000
index 000000000..264b524ea
--- /dev/null
+++ b/project/lib/mojoal
@@ -0,0 +1 @@
+Subproject commit 264b524ea5664f5e35c6246012cfcd5dd30a6c46