summaryrefslogtreecommitdiff
path: root/include/compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/compiler.h')
-rw-r--r--include/compiler.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/compiler.h b/include/compiler.h
index 90b7afae53..27b9843497 100644
--- a/include/compiler.h
+++ b/include/compiler.h
@@ -6,6 +6,7 @@
#define __COMPILER_H__
#include <stddef.h>
+#include <stdbool.h>
#ifdef USE_HOSTCC
@@ -150,4 +151,12 @@ typedef unsigned long int uintptr_t;
#define MEM_SUPPORT_64BIT_DATA 0
#endif
+static inline bool host_build(void) {
+#ifdef USE_HOSTCC
+ return true;
+#else
+ return false;
+#endif
+}
+
#endif