space-data-module-sdk 0.8.22 → 0.8.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -798,6 +798,11 @@ async function compileWithEmception(options = {}) {
|
|
|
798
798
|
);
|
|
799
799
|
}
|
|
800
800
|
|
|
801
|
+
// The embedded manifest and the invoke bridge get the module source's
|
|
802
|
+
// own optimization flags. Without them both objects built at -O0 and
|
|
803
|
+
// every payload byte crossing the bridge (the std::vector copies of
|
|
804
|
+
// each request and response) cost hundreds of interpreted wasm
|
|
805
|
+
// instructions. The wasi path already compiles them this way.
|
|
801
806
|
const remainingCommands = [
|
|
802
807
|
[
|
|
803
808
|
"em++",
|
|
@@ -806,6 +811,7 @@ async function compileWithEmception(options = {}) {
|
|
|
806
811
|
"-std=c++17",
|
|
807
812
|
`-I${workDir}`,
|
|
808
813
|
`-I${runtimeIncludeDir}`,
|
|
814
|
+
...buildSourceCompilerArgs(compileOptions),
|
|
809
815
|
"-o",
|
|
810
816
|
manifestObjectPath,
|
|
811
817
|
],
|
|
@@ -816,6 +822,7 @@ async function compileWithEmception(options = {}) {
|
|
|
816
822
|
"-std=c++17",
|
|
817
823
|
`-I${workDir}`,
|
|
818
824
|
`-I${runtimeIncludeDir}`,
|
|
825
|
+
...buildSourceCompilerArgs(compileOptions),
|
|
819
826
|
"-o",
|
|
820
827
|
invokeObjectPath,
|
|
821
828
|
],
|
|
@@ -973,13 +980,15 @@ async function compileWithSystemEmscripten(options = {}) {
|
|
|
973
980
|
linkObjectPath,
|
|
974
981
|
];
|
|
975
982
|
await runSystemCompiler(sourceCompilerCommand, linkCompileArgs);
|
|
983
|
+
// Same optimization flags as the module source (see compileWithEmception).
|
|
984
|
+
// buildSourceCompilerArgs carries -pthread whenever usesPthreadCompileFlags.
|
|
976
985
|
await runSystemCompiler("em++", [
|
|
977
986
|
"-c",
|
|
978
987
|
manifestSourcePath,
|
|
979
988
|
"-std=c++17",
|
|
980
989
|
`-I${tempDir}`,
|
|
981
990
|
`-I${runtimeIncludeDir}`,
|
|
982
|
-
...(
|
|
991
|
+
...buildSourceCompilerArgs(compileOptions),
|
|
983
992
|
"-o",
|
|
984
993
|
manifestObjectPath,
|
|
985
994
|
]);
|
|
@@ -989,7 +998,7 @@ async function compileWithSystemEmscripten(options = {}) {
|
|
|
989
998
|
"-std=c++17",
|
|
990
999
|
`-I${tempDir}`,
|
|
991
1000
|
`-I${runtimeIncludeDir}`,
|
|
992
|
-
...(
|
|
1001
|
+
...buildSourceCompilerArgs(compileOptions),
|
|
993
1002
|
"-o",
|
|
994
1003
|
invokeObjectPath,
|
|
995
1004
|
]);
|