diff --git a/BUILD.gn b/BUILD.gn index d593fd77180243483dcbd657447903518149bb9c..13489c042541d4dd632a7446b6cdd5669f748ed4 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -70,7 +70,7 @@ group("maplegendef") { root_build_dir), rebase_path("${MAPLEALL_ROOT}/maple_be/include/ad/cortex_a55", root_build_dir), - rebase_path("${MAPLE_ROOT}/output/common/target", + rebase_path("${MAPLE_BUILD_OUTPUT}/common/target", root_build_dir), ]) } diff --git a/Makefile b/Makefile index 113a22b738aad7d7e1ee22a20a89d96d3ecd5832..208d4e8b84e56ac47088c25c946478f724e995e9 100644 --- a/Makefile +++ b/Makefile @@ -14,9 +14,9 @@ # # Makefile for OpenArkCompiler OPT := O2 -DEBUG := 0 +DEBUG := $(MAPLE_DEBUG) OPS_ANDROID := 0 -INSTALL_DIR := $(MAPLE_ROOT)/output +INSTALL_DIR := $(MAPLE_BUILD_OUTPUT) MAPLE_BIN_DIR := $(MAPLE_ROOT)/src/mapleall/bin MRT_ROOT := $(MAPLE_ROOT)/src/mrt ifeq ($(DEBUG),0) @@ -74,12 +74,13 @@ maple-rt: java-core-def .PHONY: libcore libcore: install maple-rt - cd $(MAPLE_ROOT)/libjava-core; \ + cd $(MAPLE_BUILD_OUTPUT)/libjava-core; \ $(MAKE) install OPT=$(OPT) DEBUG=$(DEBUG) OPS_ANDROID=$(OPS_ANDROID) .PHONY: java-core-def java-core-def: install - cd $(MAPLE_ROOT)/libjava-core; \ + cp -rp $(MAPLE_ROOT)/libjava-core $(MAPLE_BUILD_OUTPUT)/; \ + cd $(MAPLE_BUILD_OUTPUT)/libjava-core; \ ln -f -s $(MAPLE_ROOT)/build/core/libcore.mk ./makefile; \ $(MAKE) gen-def OPT=$(OPT) DEBUG=$(DEBUG) OPS_ANDROID=$(OPS_ANDROID) @@ -115,23 +116,18 @@ test_irbuild: install .PHONY: test_ourboros test_ourboros: libcore - python3 test/main.py test//testsuite/ouroboros --test_cfg=test/testsuite/ouroboros/test.cfg --timeout=180 -j20 --retry 1 --fail_exit -pFAIL + python3 test/main.py test/testsuite/ouroboros --test_cfg=test/testsuite/ouroboros/test.cfg --timeout=180 -j20 --retry 1 --fail_exit -pFAIL .PHONY: testall testall: test_irbuild test_ourboros .PHONY: clean clean: - @rm -rf output/ - @rm -f libjava-core/libcore-all.* - @rm -f libjava-core/*.mpl - @rm -f libjava-core/*.mplt - @rm -f libjava-core/*.groots.txt - @rm -f libjava-core/*.primordials.txt - @rm -rf libjava-core/comb.log - @rm -rf libjava-core/*.muid - @rm -f libjava-core/*.s - @rm -rf libjava-core/*.o + @rm -rf $(MAPLE_BUILD_OUTPUT)/ + +.PHONY: clobber +clobber: clean + @rm -rf output define build_gn mkdir -p $(INSTALL_DIR); \ diff --git a/Readme.md b/Readme.md index 4b536ab2f3b6691c4f7cdc71ea0c6829986d3b31..1a3b5b4fedb240261b0c65960977b214cb2cb857 100644 --- a/Readme.md +++ b/Readme.md @@ -39,7 +39,7 @@ Open the front end, back end, and compilation optimization of compilers. Support - Maple Engine https://gitee.com/openarkcompiler-incubator/maple_engine ## How to use -- source build/envsetup.sh +- source build/envsetup.sh arm release - make setup - make - make libcore diff --git a/Readme_zh.md b/Readme_zh.md index 12dd1d041984b28988a43cc2d268fab64c538fa7..6bfba5aec2788d3fffe550f56b914bd2134bf294 100644 --- a/Readme_zh.md +++ b/Readme_zh.md @@ -35,7 +35,7 @@ OpenArkCompiler是来自华为方舟编译器的开源项目。 **计划持续更新...** ## 如何使用 -- source build/envsetup.sh +- source build/envsetup.sh arm release - make setup - make - make libcore diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn index 6dfe079489b231557cd1be3a94d11e6cd38f5eec..1fa4e65631d70795ce7786eaa966a181bc1001c4 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -27,8 +27,11 @@ declare_args() { } # Define global args -MAPLE_ROOT = "${GN_INSTALL_PREFIX}" -ANDROID_ROOT = "${GN_INSTALL_PREFIX}/android" +MAPLE_ROOT = getenv("MAPLE_ROOT") +ANDROID_ROOT = "${MAPLE_ROOT}/android" +MAPLE_BUILD_TYPE = getenv("MAPLE_BUILD_TYPE") +MAPLE_BUILD_OUTPUT = getenv("MAPLE_BUILD_OUTPUT") + DYNAMICLANG = true RC_V2 = true TEST_BENCHMARK = false @@ -36,7 +39,7 @@ MEMORY_LEAK_CHECK = false MARK_CYCLE_ROOTS = false OPENSOURCE_DEPS = "${MAPLE_ROOT}/src/mapleall/deplibs" -OPENSOURCE_OUTPUT = "${MAPLE_ROOT}/output" +OPENSOURCE_OUTPUT = "${MAPLE_BUILD_OUTPUT}" AST2MPL_ROOT = "${MAPLE_ROOT}/src/ast2mpl" IS_AST2MPL_EXISTS = getenv("IS_AST2MPL_EXISTS") MAPLEALL_ROOT = "${MAPLE_ROOT}/src" @@ -46,11 +49,11 @@ MAPLE_MRT_ROOT = "${MAPLE_ROOT}/src/mrt" THIRD_PARTY_ROOT = "${MAPLE_ROOT}/third_party" # Put all built library files under lib -GN_ARCHIVE_OUTPUT_DIRECTORY = "${GN_INSTALL_PREFIX}/output/ar" -GN_LIBRARY_OUTPUT_DIRECTORY = "${GN_INSTALL_PREFIX}/output/lib" +GN_ARCHIVE_OUTPUT_DIRECTORY = "${MAPLE_BUILD_OUTPUT}/ar" +GN_LIBRARY_OUTPUT_DIRECTORY = "${MAPLE_BUILD_OUTPUT}/lib" # Put all built binary files under bin -GN_BINARY_OUTPUT_DIRECTORY = "${GN_INSTALL_PREFIX}/output/bin" +GN_BINARY_OUTPUT_DIRECTORY = "${MAPLE_BUILD_OUTPUT}/bin" import("${MAPLE_ROOT}/build/config.gni") diff --git a/build/core/libcore.mk b/build/core/libcore.mk index 58d99da3a165cbd8065ea94d47adbb1814c5cf0c..32f0ac069b4d2edf5c23a828c8380cc00f7731d8 100644 --- a/build/core/libcore.mk +++ b/build/core/libcore.mk @@ -79,8 +79,8 @@ install: libcore_so deplibs $(shell mkdir -p $(MAPLE_OUT)/ops/host-x86_64-$(OPT); \ mkdir -p $(MAPLE_OUT)/ops/third_party; \ rsync -a -L $(MAPLE_OUT)/lib/$(OPT)/libcore-all.so $(MAPLE_OUT)/ops/host-x86_64-$(OPT); \ - rsync -a -L $(MAPLE_ROOT)/libjava-core/mrt_module_init.o $(MAPLE_OUT)/ops/; \ - rsync -a -L $(MAPLE_ROOT)/libjava-core/libcore-all.mplt $(MAPLE_OUT)/ops/; \ + rsync -a -L $(MAPLE_OUT)/libjava-core/mrt_module_init.o $(MAPLE_OUT)/ops/; \ + rsync -a -L $(MAPLE_OUT)/libjava-core/libcore-all.mplt $(MAPLE_OUT)/ops/; \ rsync -a -L $(MAPLE_ROOT)/third_party/libnativehelper $(MAPLE_OUT)/ops/; \ rsync -a -L $(MAPLE_ROOT)/android/out/target/common/obj/JAVA_LIBRARIES $(MAPLE_OUT)/ops/third_party; \ rsync -a -L $(MAPLE_ROOT)/third_party/libdex/prebuilts/aarch64-linux-gnu/libz.so.1.2.8 $(MAPLE_OUT)/ops/third_party/libz.so.1; \ diff --git a/build/core/maple_variables.mk b/build/core/maple_variables.mk index 9b9c79f4ec1cfd6d6e753e3af73e364d1c29da3c..c28d4b151b79b7e3f7b34de65ede945c51de81e6 100644 --- a/build/core/maple_variables.mk +++ b/build/core/maple_variables.mk @@ -14,7 +14,7 @@ # OPT := O2 DEBUG := 0 -LIB_CORE_PATH := $(MAPLE_ROOT)/libjava-core +LIB_CORE_PATH := $(MAPLE_BUILD_OUTPUT)/libjava-core LIB_CORE_JAR := $(LIB_CORE_PATH)/java-core.jar LIB_CORE_MPLT := $(LIB_CORE_PATH)/java-core.mplt @@ -36,7 +36,7 @@ APP_O := $(foreach APP, $(TARGETS), $(APP).VtableImpl.o) APP_QEMU_SO := $(foreach APP, $(TARGETS), $(APP).VtableImpl.qemu.so) APP_VTABLEIMPL_MPL := $(foreach APP, $(TARGETS), $(APP).VtableImpl.mpl) -MAPLE_OUT := $(MAPLE_ROOT)/output +MAPLE_OUT := $(MAPLE_BUILD_OUTPUT) JAVA2JAR := $(MAPLE_OUT)/bin/java2jar JBC2MPL_BIN := $(MAPLE_OUT)/bin/jbc2mpl MAPLE_BIN := $(MAPLE_OUT)/bin/maple diff --git a/build/envsetup.sh b/build/envsetup.sh index 2d20788815a248e549187b31aa182f37baa3494d..c239e9cbdac1b03bdd48cf4bc9b4c6867d4bf9fb 100644 --- a/build/envsetup.sh +++ b/build/envsetup.sh @@ -14,6 +14,17 @@ # See the Mulan PSL v2 for more details. # +function print_usage { + echo " " + echo "usage: source envsetup.sh arm/ark/engine/riscv release/debug" + echo " " +} + +if [ "$#" -lt 2 ]; then + print_usage +# return +fi + curdir=$(pwd) unset MAPLE_ROOT export MAPLE_ROOT=${curdir} @@ -21,7 +32,6 @@ unset ANDROID_ROOT export ANDROID_ROOT=${curdir}/android unset MAPLE_BUILD_CORE export MAPLE_BUILD_CORE=${MAPLE_ROOT}/build/core -export PATH=$PATH:${MAPLE_ROOT}/output/bin unset IS_AST2MPL_EXISTS if [ -d ${MAPLE_ROOT}/src/ast2mpl ]; then export IS_AST2MPL_EXISTS=1 @@ -30,3 +40,76 @@ else fi export GCOV_PREFIX=${MAPLE_ROOT}/report/gcda export GCOV_PREFIX_STRIP=7 + +# workaround for current build +if [ "$#" -eq 0 ]; then +unset MAPLE_BUILD_OUTPUT +export MAPLE_BUILD_OUTPUT=${MAPLE_ROOT}/output + +unset MAPLE_EXECUTE_BIN +export MAPLE_EXECUTE_BIN=${MAPLE_ROOT}/output/bin + +unset MAPLE_DEBUG +export MAPLE_DEBUG=0 +return +fi + +# support multiple ARCH and BUILD_TYPE + +if [ $1 = "arm" ]; then + PLATFORM=aarch64 + USEOJ=0 +elif [ $1 = "engine" ]; then + PLATFORM=ark + USEOJ=1 +elif [ $1 = "ark" ]; then + PLATFORM=ark + USEOJ=1 +elif [ $1 = "ark2" ]; then + PLATFORM=ark + USEOJ=2 +elif [ $1 = "riscv" ]; then + PLATFORM=riscv64 + USEOJ=0 +else + print_usage + return +fi + +if [ "$2" = "release" ]; then + TYPE=release + DEBUG=0 +elif [ "$2" = "debug" ]; then + TYPE=debug + DEBUG=1 +else + print_usage + return +fi + +unset MAPLE_DEBUG +export MAPLE_DEBUG=0 + +unset TARGET_PROCESSOR +export TARGET_PROCESSOR=${PLATFORM} + +unset TARGET_SCOPE +export TARGET_SCOPE=${TYPE} + +unset USE_OJ_LIBCORE +export USE_OJ_LIBCORE=${USEOJ} + +unset TARGET_TOOLCHAIN +export TARGET_TOOLCHAIN=clang + +unset MAPLE_BUILD_TYPE +export MAPLE_BUILD_TYPE=${TARGET_PROCESSOR}-${TARGET_TOOLCHAIN}-${TARGET_SCOPE} + +unset MAPLE_BUILD_OUTPUT +export MAPLE_BUILD_OUTPUT=${MAPLE_ROOT}/output/${MAPLE_BUILD_TYPE} + +unset MAPLE_EXECUTE_BIN +export MAPLE_EXECUTE_BIN=${MAPLE_ROOT}/output/${MAPLE_BUILD_TYPE}/bin + +export PATH=$PATH:${MAPLE_EXECUTE_BIN} + diff --git a/doc/cn/DeveloperGuide.md b/doc/cn/DeveloperGuide.md index 017be1727b047e3904e72bc47056838cd029204c..c99545f42b7b02dbf8f7f1fc527d5294395d8fd6 100644 --- a/doc/cn/DeveloperGuide.md +++ b/doc/cn/DeveloperGuide.md @@ -13,23 +13,24 @@ ## 源码编译 -在openarkcompiler目录下执行以下命令,编译出OpenArkCompiler,默认输出路径 openarkcompiler/output/bin。 +在openarkcompiler目录下执行以下命令,编译出OpenArkCompiler,默认输出路径 openarkcompiler/output/TYPE/bin, TYPE: aarch64-clang-release。 ``` -source build/envsetup.sh +source build/envsetup.sh arm release +make setup make ``` 命令说明: -- `source build/envsetup.sh` 初始化环境,将OpenArkCompiler工具链路径openarkcompiler/output/bin设置到环境变量中; +- `source build/envsetup.sh arm release` 初始化环境,将OpenArkCompiler工具链路径openarkcompiler/output/TYPE/bin设置到环境变量中; - `make` 编译OpenArkCompiler的Release版本; - `make BUILD_TYPE=DEBUG` 编译OpenArkCompiler的Debug版本。 -在openarkcompiler目录下执行以下命令,编译出OpenArkCompiler及maple runtime部分,默认输出路径 openarkcompiler/output。 +在openarkcompiler目录下执行以下命令,编译出OpenArkCompiler及maple runtime部分,默认输出路径 openarkcompiler/output/TYPE。 ``` -source build/envsetup.sh +source build/envsetup.sh arm release make libcore ``` @@ -58,7 +59,7 @@ source build/build.sh 编译前,请先在openarkcompiler目录下创建libjava-core目录,拷贝java-core.jar到此目录下,在openarkcompiler目录执行以下命令: ``` -source build/envsetup.sh +source build/envsetup.sh arm release make cd libjava-core jbc2mpl -injar java-core.jar -out libjava-core @@ -73,7 +74,7 @@ jbc2mpl -injar java-core.jar -out libjava-core 以samples/helloworld/代码为例,在openarkcompiler/目录下执行以下命令: ``` -source build/envsetup.sh +source build/envsetup.sh arm release make cd samples/helloworld/ make @@ -86,17 +87,17 @@ make 静态源码检查之前,需要先编译出OpenArkCompiler。此后,以检查src/maple_driver源码为例,在openarkcompiler目录下执行以下命令: ``` -cp output/compile_commands.json ./ +cp output/TYPE/compile_commands.json ./ ./tools/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04/share/clang/run-clang-tidy.py -clang-tidy-binary='./tools/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang-tidy' -clang-apply-replacements-binary='./tools/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang-apply-replacements' src/maple_driver/ ``` 命令说明: -- `cp output/compile_commands.json ./` 将output目录之下的compile_commands.json复制到当前目录之下,它是clang-tidy运行所需要的编译命令; +- `cp output/TYPE/compile_commands.json ./` 将output/TYPE目录之下的compile_commands.json复制到当前目录之下,它是clang-tidy运行所需要的编译命令; - `./tools/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04/share/clang/run-clang-tidy.py` 调用clang-tidy进行批量检查的脚本run-clang-tidy.py,其中 `./tools/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04/`目录是之前配置的clang编译器的发行包主目录; `-clang-tidy-binary` 是指明clang-tidy的具体位置; `-clang-apply-replacements-binary` 是指明run-clang-tidy.py所依赖的clang-apply-replacements的位置; `src/maple_driver/` 是要进行源码检查的目录。 ## 编译器注意事项 - 方舟编译器前端暂时不支持字节码校验,未符合dex、jbc语义的字节码输入可能造成编译器Crash。 -- 方舟编译器中后端暂时不支持IR中间件语法校验,未符合MapleIR语义的中间件输入可能造成编译器Crash。 \ No newline at end of file +- 方舟编译器中后端暂时不支持IR中间件语法校验,未符合MapleIR语义的中间件输入可能造成编译器Crash。 diff --git a/src/mapleall/maple_be/BUILD.gn b/src/mapleall/maple_be/BUILD.gn index 42fb9d831e470d7a4d25669647b550c6936d04f2..66dfb9d99bed45744367f6df0afd4ac51cb3b92c 100644 --- a/src/mapleall/maple_be/BUILD.gn +++ b/src/mapleall/maple_be/BUILD.gn @@ -16,7 +16,7 @@ include_directories = [ "${MAPLEALL_ROOT}/maple_be/include/cg", "${MAPLEALL_ROOT}/maple_be/include/cg/aarch64", "${MAPLEALL_ROOT}/maple_be/include/ad", - "${MAPLE_ROOT}/output/common/target", + "${MAPLE_BUILD_OUTPUT}/common/target", "${MAPLEALL_ROOT}/maple_be/include/ad/target", "${MAPLEALL_ROOT}/maple_be/include/be/aarch64", "${MAPLEALL_ROOT}/maple_be/include/be", diff --git a/src/mapleall/maple_driver/BUILD.gn b/src/mapleall/maple_driver/BUILD.gn index 35f6705ea701d6fc2ea32ffdd6821e9884bdb261..b55a6500d63fcbf0b4aeda6ebaf3ddd1ace9bae2 100644 --- a/src/mapleall/maple_driver/BUILD.gn +++ b/src/mapleall/maple_driver/BUILD.gn @@ -23,7 +23,7 @@ include_directories = [ "${MAPLEALL_ROOT}/maple_be/include/be", "${MAPLEALL_ROOT}/maple_be/include/ad", "${MAPLEALL_ROOT}/maple_be/include/ad/target", - "${MAPLE_ROOT}/output/common/target", + "${MAPLE_BUILD_OUTPUT}/common/target", "${MAPLEALL_ROOT}/maple_be/include/cg/aarch64", "${MAPLEALL_ROOT}/maple_be/include/be/aarch64", "${MAPLEALL_ROOT}/maple_driver/defs", diff --git a/test/testsuite/irbuild_test/test.cfg b/test/testsuite/irbuild_test/test.cfg index 50b7c368c1f1e4909c9ae0de8311704f3b70973c..2298a3e84b92a2a5e07567fadd8a1700b0440a97 100644 --- a/test/testsuite/irbuild_test/test.cfg +++ b/test/testsuite/irbuild_test/test.cfg @@ -2,7 +2,7 @@ mpl = # [internal-var] -irbuild = ${MAPLE_ROOT}/output/bin/irbuild +irbuild = ${MAPLE_BUILD_OUTPUT}/bin/irbuild cmp = /usr/bin/cmp -s [description] diff --git a/test/testsuite/maple.py b/test/testsuite/maple.py index 4e6343eba11b8f4c78822ca78bab9bf3312e3871..393950c88be11e82a789f322a569d1175a737b7b 100644 --- a/test/testsuite/maple.py +++ b/test/testsuite/maple.py @@ -216,7 +216,7 @@ def do_init(components): # ----------------------------------------------------------------------- def do_prepare(components, info, maple_root): global output_name - maple_out_path = maple_root + "/output" + maple_out_path = os.environ.get("MAPLE_BUILD_OUTPUT") maple_out_lib_path = maple_out_path + "/ops" maple_out_bin_path = maple_out_path + "/bin/" gnu_bin_path = maple_root + "/tools/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04/bin/" diff --git a/test/testsuite/ouroboros/test.cfg b/test/testsuite/ouroboros/test.cfg index 08fe53d1a8bfa927c0c9e7bd3220b3483ff07adb..51b5cb0e2545a1a38c0a73c7f41b82a16f77cf7c 100644 --- a/test/testsuite/ouroboros/test.cfg +++ b/test/testsuite/ouroboros/test.cfg @@ -6,7 +6,7 @@ maple = python3 ${MAPLE_ROOT}/test/testsuite/maple.py run = python3 ${MAPLE_ROOT}/test/testsuite/run.py -build_option = --dex2mpl="-mplt $MAPLE_ROOT/libjava-core/libcore-all.mplt -litprofile=${MAPLE_ROOT}/src/mrt/codetricks/profile.pv/meta.list" --maple="-O0" --ld=" -L${MAPLE_ROOT}/output/ops/host-x86_64-O2" --cxx="-I${MAPLE_ROOT}/output/ops/libnativehelper/include_jni" +build_option = --dex2mpl="-mplt ${MAPLE_BUILD_OUTPUT}/libjava-core/libcore-all.mplt -litprofile=${MAPLE_ROOT}/src/mrt/codetricks/profile.pv/meta.list" --maple="-O0" --ld=" -L${MAPLE_BUILD_OUTPUT}/ops/host-x86_64-O2" --cxx="-I${MAPLE_BUILD_OUTPUT}/ops/libnativehelper/include_jni" run_option = diff --git a/test/testsuite/ouroboros/test_android.cfg b/test/testsuite/ouroboros/test_android.cfg index 5cd796fbe2ed17a6d513a1838d6dee79305db9fe..3e0c94967c0002aecd397c985de55369a12cf2b9 100644 --- a/test/testsuite/ouroboros/test_android.cfg +++ b/test/testsuite/ouroboros/test_android.cfg @@ -7,7 +7,7 @@ maple = python3 ${MAPLE_ROOT}/test/testsuite/android_maple.py # please set your ssh and sn run = python3 ${MAPLE_ROOT}/test/testsuite/android_run.py --ssh_user=c00520302 --ssh_ip=10.175.96.96 --sn=66J5T19401008041 -build_option = --dex2mpl="-mplt $MAPLE_ROOT/libjava-core/libcore-all.mplt -litprofile=${MAPLE_ROOT}/src/mrt/codetricks/profile.pv/meta.list" --maple="-O0" --ld=" -L${MAPLE_ROOT}/android/out/target/product/generic_arm64/apex/com.android.runtime/lib64 -L${MAPLE_ROOT}/android/out/target/product/generic_arm64/apex/com.android.runtime/lib64/bionic -L${MAPLE_ROOT}/src/mrt/deplibs -L${MAPLE_ROOT}/tools/android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/27 -L${MAPLE_ROOT}/output/ops/host-x86_64-O2" --cxx="-I${MAPLE_ROOT}/output/ops/libnativehelper/include_jni" +build_option = --dex2mpl="-mplt ${MAPLE_BUILD_OUTPUT}/libjava-core/libcore-all.mplt -litprofile=${MAPLE_ROOT}/src/mrt/codetricks/profile.pv/meta.list" --maple="-O0" --ld=" -L${MAPLE_ROOT}/android/out/target/product/generic_arm64/apex/com.android.runtime/lib64 -L${MAPLE_ROOT}/android/out/target/product/generic_arm64/apex/com.android.runtime/lib64/bionic -L${MAPLE_ROOT}/src/mrt/deplibs -L${MAPLE_ROOT}/tools/android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/27 -L${MAPLE_ROOT}/output/ops/host-x86_64-O2" --cxx="-I${MAPLE_ROOT}/output/ops/libnativehelper/include_jni" run_option = diff --git a/test/testsuite/run.py b/test/testsuite/run.py index d8ae9db8e0d52203a124f202759e920afe815b61..8b4b430682573d3a73a5a44b353ca8c0bdf032dc 100644 --- a/test/testsuite/run.py +++ b/test/testsuite/run.py @@ -64,10 +64,11 @@ def construct_qemu_cmd(execute_cmd, execute_option): execute_option["execute_files"] = ":".join( [str(file) for file in execute_option["execute_files"]] ) - LIBZ_SO = maple_root + "/output/ops/third_party" - RUNTIME_SO = maple_root + "/output/ops/host-x86_64-" + execute_option["mrt_type"] + maple_out_path = os.environ.get("MAPLE_BUILD_OUTPUT") + LIBZ_SO = maple_out_path + "/ops/third_party" + RUNTIME_SO = maple_out_path + "/ops/host-x86_64-" + execute_option["mrt_type"] APP_SO = os.getcwd() - MPLSH = maple_root + "/output/ops/mplsh" + MPLSH = maple_out_path + "/ops/mplsh" execute_cmd["run_case"] = ( "/usr/bin/qemu-aarch64 " "-L /usr/aarch64-linux-gnu -E LD_LIBRARY_PATH={LIBZ_SO}:{RUNTIME_SO}:{APP_SO} "