Skip to content

Commit

Permalink
Update mac android build files
Browse files Browse the repository at this point in the history
* Fix TypedArrayObject.prototye.indexOf bug

Signed-off-by: Seonghyun Kim <[email protected]>
  • Loading branch information
ksh8281 committed Sep 14, 2023
1 parent e7ab0df commit 78503e4
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 12 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/es-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@ jobs:
brew install cmake ninja pkg-config icu4c
- name: Build x64
env:
BUILD_OPTIONS: -DESCARGOT_MODE=debug -DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF -DESCARGOT_WASM=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja
run: |
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"
cmake -H. -Bout/mac/x64 $BUILD_OPTIONS
ninja -Cout/mac/x64
./tools/run-tests.py --engine="./out/mac/x64/escargot" new-es
BUILD_OPTIONS: -DESCARGOT_WASM=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja
run: |
cmake -H. -Bout/debug/ -DESCARGOT_MODE=debug $BUILD_OPTIONS
ninja -Cout/debug/
./tools/run-tests.py --engine="./out/debug/escargot" new-es
cmake -H. -Bout/release/ -DESCARGOT_MODE=release $BUILD_OPTIONS
ninja -Cout/release/
cp test/octane/*.js .
./out/release/escargot run.js
build-test-on-android:
runs-on: macos-12
Expand Down
4 changes: 2 additions & 2 deletions build/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ plugins {

android {
namespace 'com.samsung.lwe.escargot.shell'
compileSdk 33
compileSdk 34

defaultConfig {
applicationId "com.samsung.lwe.escargot.shell"
minSdk 28
targetSdk 33
targetSdk 34
versionCode 1
versionName "1.0"

Expand Down
4 changes: 2 additions & 2 deletions build/android/escargot/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ ext {

android {
namespace 'com.samsung.lwe.escargot'
compileSdk 33
compileSdk 34

defaultConfig {
minSdk 28
targetSdk 33
targetSdk 34

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand Down
8 changes: 7 additions & 1 deletion build/target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SET (ESCARGOT_BUILD_64BIT_LARGE OFF)
SET (COMPILER_CLANG_CL OFF)
IF (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
IF (DEFINED CMAKE_CXX_COMPILER_FRONTEND_VARIANT)
IF (${CMAKE_CXX_COMPILER_FRONTEND_VARIANT} STREQUAL "MSVC")
IF (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
SET (COMPILER_CLANG_CL ON)
ENDIF()
ENDIF()
Expand Down Expand Up @@ -154,6 +154,12 @@ ELSEIF (${ESCARGOT_HOST} STREQUAL "darwin" AND ${ESCARGOT_ARCH} STREQUAL "x64")
SET (ESCARGOT_BUILD_64BIT_LARGE ON)
# bdwgc mac cannot support pthread_getattr_np
SET (ESCARGOT_THIRDPARTY_CFLAGS ${ESCARGOT_THIRDPARTY_CFLAGS} -UHAVE_PTHREAD_GETATTR_NP)
# dlopen version not working correctly on mac
IF (NOT DEFINED ESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN)
SET (ESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN OFF)
ENDIF()
# add pkg_config_path icu install path of brew
SET (ENV{PKG_CONFIG_PATH} "/usr/local/opt/icu4c/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
ELSEIF (${ESCARGOT_HOST} STREQUAL "windows")
SET (ESCARGOT_LDFLAGS ${ESCARGOT_LDFLAGS} icu.lib)
SET (ESCARGOT_CXXFLAGS ${ESCARGOT_CXXFLAGS} -DSTACK_LIMIT_FROM_BASE=1048576) # in windows, default stack limit is 1MB
Expand Down
2 changes: 2 additions & 0 deletions src/builtins/BuiltinTypedArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,8 @@ static Value fastTypedArrayIndexSearch(TypedArrayObject* arr, size_t k, size_t l
}
} else if (UNLIKELY(!value.isNumber())) {
return Value(-1);
} else if (UNLIKELY(arr->rawBuffer() == nullptr)) {
return Value(-1);
}

uint8_t* buffer = arr->rawBuffer();
Expand Down
2 changes: 1 addition & 1 deletion third_party/GCutil
Submodule GCutil updated 1 files
+2 −2 CMakeLists.txt

0 comments on commit 78503e4

Please sign in to comment.