mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Update README
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
parent
a2b62f7c9f
commit
80848e9d6c
1 changed files with 25 additions and 80 deletions
117
README.md
117
README.md
|
|
@ -1,11 +1,4 @@
|
|||
# Escargot
|
||||
|
||||
[](LICENSE)
|
||||
[](https://github.com/Samsung/escargot/releases)
|
||||

|
||||
[](https://github.com/Samsung/escargot/actions)
|
||||
[](https://scan.coverity.com/projects/samsung-escargot)
|
||||
[](https://codecov.io/gh/Samsung/escargot)
|
||||
# Try-Catch Version of Escargot (Origin)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
|
@ -22,95 +15,47 @@ sudo apt-get install gcc-multilib g++-multilib
|
|||
sudo apt-get install libicu-dev:i386
|
||||
```
|
||||
|
||||
#### On macOS
|
||||
|
||||
```sh
|
||||
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
|
||||
|
||||
build core runtime of Escargot engine (excluding intl, temporal etc)
|
||||
```sh
|
||||
git clone https://github.com/Samsung/escargot.git
|
||||
git clone https://github.com/Samsung/escargot.git -b try-catch
|
||||
cd escargot
|
||||
git submodule update --init third_party
|
||||
cmake -DESCARGOT_HOST=linux -DESCARGOT_ARCH=x64 -DESCARGOT_MODE=release -DESCARGOT_OUTPUT=shell -GNinja
|
||||
ninja
|
||||
cmake -H. -Bout/test/release -DESCARGOT_HOST=linux -DESCARGOT_ARCH=[x86|x64|arm|aarch64] -DESCARGOT_MODE=release -DESCARGOT_OUTPUT=shell -DESCARGOT_THREADING=ON -DESCARGOT_TEST=ON -GNinja
|
||||
ninja -Cout/test/release
|
||||
```
|
||||
|
||||
## Build Android version
|
||||
|
||||
```sh
|
||||
git clone https://github.com/Samsung/escargot.git
|
||||
cd escargot
|
||||
git submodule update --init third_party
|
||||
export ANDROID_SDK_ROOT=.... # set your android SDK root first
|
||||
cd build/android/
|
||||
./gradlew bundleReleaseAar # build escargot AAR
|
||||
./gradlew assembleDebug # build debug test shell
|
||||
./gradlew :escargot:connectedDebugAndroidTest # run escargot-jni tests on android device
|
||||
./gradlew :escargot:testDebugUnitTest # run escargot-jni tests on host
|
||||
./gradlew bundleHostJar # bundle jar for host
|
||||
```
|
||||
|
||||
## Build Windows version
|
||||
|
||||
Install VS2022 with cmake and ninja.
|
||||
Open [ x86 Native Tools Command Prompt for VS 2022 | x64 Native Tools Command Prompt for VS 2022 ]
|
||||
```sh
|
||||
git clone https://github.com/Samsung/escargot.git
|
||||
cd escargot
|
||||
git submodule update --init third_party
|
||||
|
||||
CMake -G "Visual Studio 17 2022" -DCMAKE_SYSTEM_NAME=[ Windows | WindowsStore ] -DCMAKE_SYSTEM_VERSION:STRING="10.0" -DCMAKE_SYSTEM_PROCESSOR=[ x86 | x64 ] -DCMAKE_GENERATOR_PLATFORM=[ Win32 | x64 ],version=10.0.18362.0 -DESCARGOT_ARCH=[ x86 | x64 ] -DESCARGOT_MODE=release -Bout -DESCARGOT_HOST=windows -DESCARGOT_OUTPUT=shell -DESCARGOT_LIBICU_SUPPORT=ON -DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF -DESCARGOT_THREADING=ON
|
||||
cd out
|
||||
msbuild ESCARGOT.sln /property:Configuration=Release /p:platform=[ Win32 | x64 ]
|
||||
```
|
||||
|
||||
#### Build options
|
||||
|
||||
The following build options are supported when generating ninja rules using cmake.
|
||||
|
||||
* -DESCARGOT_HOST=[ linux | tizen_obs | darwin | android | windows ]<br>
|
||||
Compile Escargot for Linux, Tizen, macOS, or Windows platform
|
||||
* -DESCARGOT_ARCH=[ x64 | x86 | arm | i686 | aarch64 ]<br>
|
||||
Compile Escargot for each architecture
|
||||
* -DESCARGOT_MODE=[ debug | release ]<br>
|
||||
Compile Escargot for either release or debug mode
|
||||
* -DESCARGOT_OUTPUT=[ shared_lib | static_lib | shell | cctest ]<br>
|
||||
Define target output type
|
||||
* -DESCARGOT_LIBICU_SUPPORT=[ ON | OFF ]<br>
|
||||
Enable libicu library if set ON. (Optional, default = ON)
|
||||
* -DESCARGOT_THREADING=[ ON | OFF ]<br>
|
||||
Enable Threading support. (Optional, default = OFF)
|
||||
* -DESCARGOT_CODE_CACHE=[ ON | OFF ]<br>
|
||||
Enable Code cache support. (Optional, default = OFF)
|
||||
* -DESCARGOT_WASM=[ ON | OFF ]<br>
|
||||
Enable WASM support. (Optional, default = OFF)
|
||||
* -DESCARGOT_SMALL_CONFIG=[ ON | OFF ]<br>
|
||||
Enable Options for small devices. (Optional, default = OFF)
|
||||
|
||||
## Testing
|
||||
|
||||
First, get benchmarks and tests:
|
||||
#### octane
|
||||
|
||||
Using test runner
|
||||
```sh
|
||||
git submodule update --init
|
||||
tools/run-tests.py --engine=ESCARGOT_BINARY_PATH octane
|
||||
```
|
||||
|
||||
### Benchmarks
|
||||
|
||||
Test run for each benchmark (Sunspider, Octane, V8, Chakracore, test262,
|
||||
SpiderMonkey, etc.):
|
||||
Or directly run octane benchmarks
|
||||
```sh
|
||||
tools/run-tests.py --arch=x86_64 spidermonkey test262 v8
|
||||
cd test/octane/
|
||||
./escargot run.js
|
||||
```
|
||||
#### sunspider
|
||||
|
||||
Using test runner
|
||||
```sh
|
||||
tools/run-tests.py --engine=ESCARGOT_BINARY_PATH sunspider-js
|
||||
```
|
||||
|
||||
#### kraken
|
||||
|
||||
download kraken benchmark
|
||||
```sh
|
||||
git clone https://github.com/mozilla-it/krakenbenchmark.mozilla.org.git
|
||||
```
|
||||
run kraken benchmark
|
||||
```sh
|
||||
cd krakenbenchmark.mozilla.org
|
||||
./sunspider --shell ESCARGOT_BINARY_PATH --suite kraken-1.1
|
||||
```
|
||||
results would be stored in `kraken-1.1-results` directory
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue