Skip to content

Commit

Permalink
* fixed: wrong os.name on arm64 simulator (MobiVM#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkimitsa authored Apr 12, 2023
1 parent 5cb662a commit 83c6d99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions compiler/vm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,10 @@ set(INSTALL_DIR ${CMAKE_SOURCE_DIR}/target/binaries/${OS}/${ARCH})
# at this point convert remove "-simulator" suffix as it will conflict as sub-modules
if (ARCH STREQUAL "arm64-simulator")
set(ARCH arm64)
add_definitions(-DRVM_SIMULATOR)
elseif (ARCH STREQUAL "x86_64-simulator")
set(ARCH x86_64)
add_definitions(-DRVM_SIMULATOR)
endif()

if (ARCH STREQUAL "x86_64")
Expand Down
2 changes: 1 addition & 1 deletion compiler/vm/rt/robovm/java_lang_System.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ObjectArray* Java_java_lang_System_robovmSpecialProperties(Env* env, Class* c) {

#if defined(DARWIN)
char* osName = NULL;
# if defined(IOS) && (defined(RVM_X86) || defined(RVM_X86_64))
# if defined(IOS) && defined(RVM_SIMULATOR)
osName = "os.name=iOS Simulator";
# elif defined(IOS)
osName = "os.name=iOS";
Expand Down

0 comments on commit 83c6d99

Please sign in to comment.