From dc2e44466236562c9e1b8f86efb59eef689a34b9 Mon Sep 17 00:00:00 2001 From: Wen HU Date: Tue, 5 Jan 2021 09:00:06 -0800 Subject: [PATCH 1/3] add dependencies in makefiles --- Makefile | 8 ++++---- build/core/libcore.mk | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index ffff51dbcd..5f099abf5a 100644 --- a/Makefile +++ b/Makefile @@ -106,16 +106,16 @@ setup: (cd tools; ./setup_tools.sh) .PHONY: test1 -test1: +test1: libcore python3 test/main.py test/testsuite/ouroboros/string_test/RT0001-rt-string-ReflectString/ReflectString.java --test_cfg=test/testsuite/ouroboros/test.cfg --fail-verbose --debug .PHONY: test_irbuild -test_irbuild: +test_irbuild: install python3 test/main.py test/testsuite/irbuild_test --test_cfg=test/testsuite/irbuild_test/test.cfg -j20 -pFAIL .PHONY: test_ourboros -test_ourboros: - python3 test/main.py test//testsuite/ouroboros --test_cfg=test/testsuite/ouroboros/test.cfg --timeout=180 -j20 --retry 1 --fail_exit -pFAIL +test_ourboros: libcore + python3 test/main.py test//testsuite/ouroboros --test_cfg=test/testsuite/ouroboros/test.cfg --timeout=180 -j20 --fail_exit -pFAIL .PHONY: testall testall: test_irbuild test_ourboros diff --git a/build/core/libcore.mk b/build/core/libcore.mk index 092389c26c..58d99da3a1 100644 --- a/build/core/libcore.mk +++ b/build/core/libcore.mk @@ -65,7 +65,7 @@ include $(MAPLE_BUILD_CORE)/extra.mk include $(MAPLE_BUILD_CORE)/mplcomb_dex.mk include $(MAPLE_BUILD_CORE)/dex2mpl.mk -$(APP_DEX): %.dex : $(D8) +$(APP_DEX): %.dex : $(D8) $(LIB_CORE_JAR) $(D8) --min-api 39 --output . $(LIB_CORE_JAR) mv classes.dex $(APP_DEX) -- Gitee From e7b592374f0223256e1966d52d6c51a343cfd6a9 Mon Sep 17 00:00:00 2001 From: Wen HU Date: Tue, 5 Jan 2021 09:01:47 -0800 Subject: [PATCH 2/3] add tools/build_and_run.sh --- tools/build_and_run.sh | 43 ++++++++++++++++++++++++++++++++++++++++++ tools/setup_tools.sh | 9 ++++++--- 2 files changed, 49 insertions(+), 3 deletions(-) create mode 100755 tools/build_and_run.sh diff --git a/tools/build_and_run.sh b/tools/build_and_run.sh new file mode 100755 index 0000000000..da0cb68fb3 --- /dev/null +++ b/tools/build_and_run.sh @@ -0,0 +1,43 @@ +#!/bin/bash -x +# +# Copyright (C) [2020] Futurewei Technologies, Inc. All rights reverved. +# +# Licensed under the Mulan Permissive Software License v2. +# You can use this software according to the terms and conditions of the MulanPSL - 2.0. +# You may obtain a copy of MulanPSL - 2.0 at: +# +# https://opensource.org/licenses/MulanPSL-2.0 +# +# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR +# FIT FOR A PARTICULAR PURPOSE. +# See the MulanPSL - 2.0 for more details. +# + +set -e + +today=$(date +%Y-%m-%d-%H_%M) + +cd $MAPLE_ROOT +make clean + +mkdir -p output +REPORT=output/report.txt +touch $REPORT + +echo $today >> $REPORT + +echo "start OpenArkCompiler build and testing..." >> $REPORT + +echo "make setup" >> $REPORT +make setup +echo "make" >> $REPORT +make + +echo "make libcore" +make libcore +echo "make testall" >> $REPORT +make testall 2>> $REPORT + +cat $REPORT +echo "end OpenArkCompiler ..." diff --git a/tools/setup_tools.sh b/tools/setup_tools.sh index 78514793c4..5dd6d2744e 100755 --- a/tools/setup_tools.sh +++ b/tools/setup_tools.sh @@ -16,11 +16,14 @@ set -e +if [ -z "$MAPLE_ROOT" ]; then + export MAPLE_ROOT=$(pwd)/.. +fi +echo MAPLE_ROOT: $MAPLE_ROOT + android_env=$1 -TOOLS=$(pwd) -export MAPLE_ROOT=$TOOLS/.. -echo MAPLE_ROOT: $MAPLE_ROOT +TOOLS=$MAPLE_ROOT/tools ANDROID_VERSION=android-10.0.0_r35 ANDROID_SRCDIR=$MAPLE_ROOT/../android/$ANDROID_VERSION -- Gitee From 8ac587acc32a5f1d360a8c23d90887dc626ce1c7 Mon Sep 17 00:00:00 2001 From: Wen HU Date: Tue, 5 Jan 2021 12:51:51 -0500 Subject: [PATCH 3/3] update doc --- Readme.md | 7 +++++++ Readme_zh.md | 7 +++++++ doc/cn/DevelopmentPreparation.md | 6 +++--- doc/en/DevelopmentPreparation.md | 7 ++++++- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/Readme.md b/Readme.md index 1a6833a933..4b536ab2f3 100644 --- a/Readme.md +++ b/Readme.md @@ -38,6 +38,13 @@ Open the front end, back end, and compilation optimization of compilers. Support - FutureWei Mapleall https://gitee.com/openarkcompiler-incubator/mapleall - Maple Engine https://gitee.com/openarkcompiler-incubator/maple_engine +## How to use +- source build/envsetup.sh +- make setup +- make +- make libcore +- make testall + ## Related Documents - Architecture Design Principles diff --git a/Readme_zh.md b/Readme_zh.md index ac3dd279dd..12dd1d0419 100644 --- a/Readme_zh.md +++ b/Readme_zh.md @@ -34,6 +34,13 @@ OpenArkCompiler是来自华为方舟编译器的开源项目。 **计划持续更新...** +## 如何使用 +- source build/envsetup.sh +- make setup +- make +- make libcore +- make testall + ## 孵化器项目 - FutureWei编译器分支 https://gitee.com/openarkcompiler-incubator/mapleall - Maple Engine https://gitee.com/openarkcompiler-incubator/maple_engine diff --git a/doc/cn/DevelopmentPreparation.md b/doc/cn/DevelopmentPreparation.md index dfa793e0d4..40d597820a 100644 --- a/doc/cn/DevelopmentPreparation.md +++ b/doc/cn/DevelopmentPreparation.md @@ -18,10 +18,10 @@ sudo apt-get -y install openjdk-8-jdk git-core build-essential zlib1g-dev libc6- sudo apt-get -y install gcc-5-aarch64-linux-gnu g++-5-aarch64-linux-gnu ``` -## 安装 +## 自动安装工具 ``` -cd tools -./setup_tools.sh +source build/envsetup.sh +tools/setup_tools.sh ``` diff --git a/doc/en/DevelopmentPreparation.md b/doc/en/DevelopmentPreparation.md index eef8c7d6cf..6332c7560b 100644 --- a/doc/en/DevelopmentPreparation.md +++ b/doc/en/DevelopmentPreparation.md @@ -18,6 +18,11 @@ sudo apt-get -y install openjdk-8-jdk git-core build-essential zlib1g-dev libc6- sudo apt-get -y install gcc-5-aarch64-linux-gnu g++-5-aarch64-linux-gnu ``` +## Auto Installation of Tools +``` +source build/envsetup.sh +tools/setup_tools.sh +``` ## Installing and Configuring Clang (for Compiling the OpenArkCompiler Code) @@ -36,7 +41,7 @@ ${MAPLE_ROOT} is the root directory of the OpenArkCompiler source code. ## Installing and configuring Ninja and GN -Download **Ninja(v1.9.0)** and **GN(Linux Version)** +Download **Ninja(v1.10.0)** and **GN(Linux Version)** Ninja download address: https://github.com/ninja-build/ninja/releases GN download address: https://gitee.com/xlnb/gn_binary -- Gitee