summaryrefslogtreecommitdiff
path: root/platform/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'platform/javascript')
-rw-r--r--platform/javascript/SCsub6
-rw-r--r--platform/javascript/detect.py3
-rw-r--r--platform/javascript/power_javascript.cpp2
-rw-r--r--platform/javascript/power_javascript.h2
4 files changed, 6 insertions, 7 deletions
diff --git a/platform/javascript/SCsub b/platform/javascript/SCsub
index bd7b0c304d..02ff2090f9 100644
--- a/platform/javascript/SCsub
+++ b/platform/javascript/SCsub
@@ -2,15 +2,13 @@
Import('env')
-env.Tool('textfile')
-env.Tool('zip')
-
javascript_files = [
"os_javascript.cpp",
"audio_driver_javascript.cpp",
"javascript_main.cpp",
"audio_server_javascript.cpp",
- "javascript_eval.cpp"
+ "power_javascript.cpp",
+ "javascript_eval.cpp",
]
env_javascript = env.Clone()
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index 799b550899..c828045179 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -35,7 +35,7 @@ def get_flags():
def create(env):
# remove Windows' .exe suffix
- return env.Clone(PROGSUFFIX='')
+ return env.Clone(tools=['textfile', 'zip'], PROGSUFFIX='')
def escape_sources_backslashes(target, source, env, for_signature):
@@ -97,7 +97,6 @@ def configure(env):
env.Append(LINKFLAGS=['-s', 'ALLOW_MEMORY_GROWTH=1'])
env.extra_suffix = '.webassembly' + env.extra_suffix
else:
- env.Append(CPPFLAGS=['-s', 'ASM_JS=1'])
env.Append(LINKFLAGS=['-s', 'ASM_JS=1'])
env.Append(LINKFLAGS=['--separate-asm'])
diff --git a/platform/javascript/power_javascript.cpp b/platform/javascript/power_javascript.cpp
index d734999917..24158a34fe 100644
--- a/platform/javascript/power_javascript.cpp
+++ b/platform/javascript/power_javascript.cpp
@@ -28,7 +28,7 @@
/*************************************************************************/
#include "power_javascript.h"
-#include "core/error_macros.h"
+#include "error_macros.h"
bool PowerJavascript::UpdatePowerInfo() {
// TODO Javascript implementation
diff --git a/platform/javascript/power_javascript.h b/platform/javascript/power_javascript.h
index 53c702b98e..78a896c430 100644
--- a/platform/javascript/power_javascript.h
+++ b/platform/javascript/power_javascript.h
@@ -30,6 +30,8 @@
#ifndef PLATFORM_JAVASCRIPT_POWER_JAVASCRIPT_H_
#define PLATFORM_JAVASCRIPT_POWER_JAVASCRIPT_H_
+#include "os/power.h"
+
class PowerJavascript {
private:
int nsecs_left;