Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mac android build files #1252

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
12 changes: 1 addition & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,13 @@ sudo apt-get install libicu-dev:i386
brew install autoconf automake cmake icu4c libtool ninja pkg-config
```

Note: For later build steps (cmake, pkg-config) to find ICU libraries, you may
need to set the `PKG_CONFIG_PATH` environment variable, as instructed by brew.
E.g.:

```sh
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"
# ESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN should be `OFF` to link icu lib in static
cmake -DESCARGOT_HOST=darwin -DESCARGOT_ARCH=x64 -DESCARGOT_MODE=release -DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF -DESCARGOT_OUTPUT=shell -GNinja
```

## Build Escargot

```sh
git clone https://github.com/Samsung/escargot.git
cd escargot
git submodule update --init third_party
cmake -DESCARGOT_HOST=linux -DESCARGOT_ARCH=x64 -DESCARGOT_MODE=release -DESCARGOT_OUTPUT=shell -GNinja
cmake -DESCARGOT_MODE=release -DESCARGOT_OUTPUT=shell -GNinja
ninja
```

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