aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jsifier.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index fb6c5ba8..0e6198c0 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -1747,11 +1747,13 @@ function JSify(data, functionsOnly, givenFunctions) {
print('/* no memory initializer */'); // test purposes
}
- // Define postsets. These will be run in ATINIT, right before global initializers (which might need the postsets). We cannot
- // run them now because the memory initializer might not have been applied yet.
- print('function runPostSets() {\n');
- print(itemsDict.GlobalVariablePostSet.map(function(item) { return item.JS }).join('\n'));
- print('}\n');
+ if (phase !== 'glue') {
+ // Define postsets. These will be run in ATINIT, right before global initializers (which might need the postsets). We cannot
+ // run them now because the memory initializer might not have been applied yet.
+ print('function runPostSets() {\n');
+ print(itemsDict.GlobalVariablePostSet.map(function(item) { return item.JS }).join('\n'));
+ print('}\n');
+ }
if (USE_TYPED_ARRAYS == 2) {
if (!BUILD_AS_SHARED_LIB && !SIDE_MODULE) {