소스 검색

WASI: Add platform modules

Add minimal platform modules to support toolchain files like those in

* https://github.com/WebAssembly/wasi-sdk

or direct use of `-DCMAKE_SYSTEM_NAME="WASI"`

Fixes: #19223
Jacob Hummer 1 년 전
부모
커밋
68cd5281e4
5개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      Help/manual/cmake-variables.7.rst
  2. 1 0
      Help/variable/CMAKE_SYSTEM_NAME.rst
  3. 7 0
      Help/variable/WASI.rst
  4. 1 0
      Modules/Platform/WASI-Initialize.cmake
  5. 1 0
      Modules/Platform/WASI.cmake

+ 1 - 0
Help/manual/cmake-variables.7.rst

@@ -346,6 +346,7 @@ Variables that Describe the System
    /variable/MSVC_VERSION
    /variable/MSYS
    /variable/UNIX
+   /variable/WASI
    /variable/WIN32
    /variable/WINCE
    /variable/WINDOWS_PHONE

+ 1 - 0
Help/variable/CMAKE_SYSTEM_NAME.rst

@@ -85,6 +85,7 @@ Value                     Name
 ``UNIX_SV``               SCO UnixWare (pre release 7)
 ``UnixWare``              SCO UnixWare 7
 ``visionOS``              Apple mixed reality operating system
+``WASI``                  WebAssembly System Interface
 ``watchOS``               Apple watch operating system
 ``Windows``               Windows stationary operating systems
 ``WindowsCE``             Windows Embedded Compact

+ 7 - 0
Help/variable/WASI.rst

@@ -0,0 +1,7 @@
+WASI
+----
+
+.. versionadded:: 3.31
+
+Set to ``1`` when the target system is WebAssembly System Interface
+(:variable:`CMAKE_SYSTEM_NAME` is ``WASI``).

+ 1 - 0
Modules/Platform/WASI-Initialize.cmake

@@ -0,0 +1 @@
+set(WASI 1)

+ 1 - 0
Modules/Platform/WASI.cmake

@@ -0,0 +1 @@
+# WASI Platform