Browse Source

webassembly: reserve a system id and cpu id slot for the platform

git-svn-id: trunk@35497 -
Károly Balogh 8 years ago
parent
commit
319a397ae8
2 changed files with 10 additions and 3 deletions
  1. 5 2
      compiler/systems.inc
  2. 5 1
      compiler/systems.pas

+ 5 - 2
compiler/systems.inc

@@ -50,7 +50,8 @@
              cpu_mipsel,                   { 13 }
              cpu_jvm,                      { 14 }
              cpu_i8086,                    { 15 }
-             cpu_aarch64                   { 16 }
+             cpu_aarch64,                  { 16 }
+             cpu_wasm                      { 17 }
        );
 
        tasmmode= (asmmode_none
@@ -173,7 +174,8 @@
              system_aarch64_linux,      { 88 }
              system_i8086_win16,        { 89 }
              system_i8086_embedded,     { 90 }
-             system_arm_aros            { 91 }
+             system_arm_aros,           { 91 }
+             system_wasm_wasm32         { 92 }
        );
 
      type
@@ -226,6 +228,7 @@
              ,as_solaris_as
              ,as_m68k_vasm
              ,as_m68k_as_aout
+             ,as_wasm_binaryen
        );
 
        tlink = (ld_none,

+ 5 - 1
compiler/systems.pas

@@ -390,7 +390,7 @@ interface
        cpu2str : array[TSystemCpu] of string[10] =
             ('','i386','m68k','alpha','powerpc','sparc','vm','ia64','x86_64',
              'mips','arm', 'powerpc64', 'avr', 'mipsel','jvm', 'i8086',
-             'aarch64');
+             'aarch64', 'wasm');
 
        abiinfo : array[tabi] of tabiinfo = (
          (name: 'DEFAULT'; supported: true),
@@ -988,6 +988,10 @@ begin
     {$endif}
   {$endif cpuaarch64}
 {$endif aarch64}
+
+{$ifdef wasm}
+  default_target(system_wasm_wasm32);
+{$endif}
 end;