Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2020-06-05 17:29:52 +0300
committerGitHub <noreply@github.com>2020-06-05 17:29:52 +0300
commit2321bba344049115b0a0d58fcdfba1f9cadc4280 (patch)
tree259db2e139d86c9df4c8ee6170950b258db55633 /mcs
parent0250810bc9380d370f1e5b98b2d2c8e118a11e4e (diff)
[wasm] Fix icall linking with netcore. (#19917)
Diffstat (limited to 'mcs')
-rw-r--r--mcs/tools/wasm-tuner/tuner.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/mcs/tools/wasm-tuner/tuner.cs b/mcs/tools/wasm-tuner/tuner.cs
index ac4578f22ab..3004f35cd66 100644
--- a/mcs/tools/wasm-tuner/tuner.cs
+++ b/mcs/tools/wasm-tuner/tuner.cs
@@ -288,21 +288,26 @@ public class WasmTuner
var sorted = icalls.Where (i => i.Assembly == assembly).ToArray ();
Array.Sort (sorted);
- Console.WriteLine ($"#define ICALL_TABLE_{assembly} 1\n");
-
- Console.WriteLine ($"static int {assembly}_icall_indexes [] = {{");
+ string aname;
+ if (assembly == "mscorlib" || assembly == "System.Private.CoreLib")
+ aname = "corlib";
+ else
+ aname = assembly.Replace (".", "_");
+ Console.WriteLine ($"#define ICALL_TABLE_{aname} 1\n");
+
+ Console.WriteLine ($"static int {aname}_icall_indexes [] = {{");
foreach (var icall in sorted)
Console.WriteLine (String.Format ("{0},", icall.TokenIndex));
Console.WriteLine ("};");
foreach (var icall in sorted)
Console.WriteLine (GenIcallDecl (icall));
- Console.WriteLine ($"static void *{assembly}_icall_funcs [] = {{");
+ Console.WriteLine ($"static void *{aname}_icall_funcs [] = {{");
foreach (var icall in sorted) {
Console.WriteLine (String.Format ("// token {0},", icall.TokenIndex));
Console.WriteLine (String.Format ("{0},", icall.Func));
}
Console.WriteLine ("};");
- Console.WriteLine ($"static uint8_t {assembly}_icall_handles [] = {{");
+ Console.WriteLine ($"static uint8_t {aname}_icall_handles [] = {{");
foreach (var icall in sorted)
Console.WriteLine (String.Format ("{0},", icall.Handles ? "1" : "0"));
Console.WriteLine ("};");