Skip to content

Commit e139659

Browse files
authored
[mono][wasm] Small cleanups (#77954)
* [mono][wasm] Pass -DEMSCRIPTEN_SYSTEM_PROCESSOR=wasm to cmake so Emscripten.cmake doesn't set CMAKE_SYSTEM_PROCESSOR to x86. * [mono][wasm] Fix the hello world sample.
1 parent 6bcc3e0 commit e139659

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/mono/CMakeLists.txt

-5
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,6 @@ if(NOT "${MSVC_C_ARCHITECTURE_ID}" STREQUAL "")
358358
set(CMAKE_SYSTEM_PROCESSOR "${MSVC_C_ARCHITECTURE_ID}")
359359
endif()
360360

361-
if(HOST_BROWSER)
362-
# CMAKE_SYSTEM_PROCESSOR is set to x86 by emscripten
363-
set(CMAKE_SYSTEM_PROCESSOR "wasm")
364-
endif()
365-
366361
# Unify naming
367362
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ARMV7")
368363
set(CMAKE_SYSTEM_PROCESSOR "arm")

src/mono/mono.proj

+1
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@
351351
<_MonoCMakeArgs Include="-DENABLE_ICALL_EXPORT=1"/>
352352
<_MonoCMakeArgs Include="-DENABLE_LAZY_GC_THREAD_CREATION=1"/>
353353
<_MonoCMakeArgs Include="-DENABLE_LLVM_RUNTIME=1"/>
354+
<_MonoCMakeArgs Include="-DEMSCRIPTEN_SYSTEM_PROCESSOR=wasm"/>
354355
<_MonoCFLAGS Include="-fexceptions"/>
355356
<_MonoCFLAGS Condition="'$(MonoWasmThreads)' == 'true'" Include="-pthread"/>
356357
<_MonoCFLAGS Condition="'$(MonoWasmThreads)' == 'true'" Include="-D_GNU_SOURCE=1" />

0 commit comments

Comments
 (0)