diff --git a/test/testsuite/android_maple.py b/test/testsuite/android_maple.py index 476d579c063633ec3f442c940cd6deae1c8111bd..6a0ed31cca03ec612acc79fb865f4082c13cfeaa 100644 --- a/test/testsuite/android_maple.py +++ b/test/testsuite/android_maple.py @@ -289,8 +289,7 @@ def do_prepare(components, info, maple_root): # # ----------------------------------------------------------------------- def do_update(components, file_type): - - if file_type == "java2de": + if file_type == "java2d8": components.pop("dex2mpl") components.pop("maple") components.pop("as") diff --git a/test/testsuite/maple.py b/test/testsuite/maple.py index 48ba4e78e4e3b923cc615ac228da9afd3fd7f3ea..84616e7b912ad8a15dea88bcd9419dbfed3dac6b 100644 --- a/test/testsuite/maple.py +++ b/test/testsuite/maple.py @@ -215,7 +215,7 @@ def do_init(components): parser.add_argument("-p", "--platform", dest="target", choices=["aarch64"], default="aarch64", help="choose toolchain target, default is aarch64") # Select compile phase - parser.add_argument("-s", "--stage", dest="stage", choices=["javac", "jar", "maple", "as", "ld"], default="ld", + parser.add_argument("-s", "--stage", dest="stage", choices=["java2d8", "dex2mpl", "maple", "as", "ld"], default="ld", help="Select the compiler stage, default is ld") # set timeout limitation parser.add_argument("--timeout", metavar="TIMEOUT", dest="timeout", default=None, type=int, @@ -246,8 +246,6 @@ def do_prepare(components, info, maple_root): 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/" - javac_options = "-g -d . " - jar_options = "-cvf " as_options = "-g3 -O2 -x assembler-with-cpp -march=armv8-a -target aarch64-linux-gnu -c " cc_options = "-g3 -O2 -c -march=armv8-a -target aarch64-linux-gnu" cxx_options = "-g3 -O2 -c -fPIC -march=armv8-a -target aarch64-linux-gnu" @@ -256,45 +254,33 @@ def do_prepare(components, info, maple_root): + "-fuse-ld=lld -rdynamic -lcore-all -lcommon-bridge -Wl,-z,notext -Wl,-T"\ + maple_out_lib_path + "/linker/maplelld.so.lds" - components["javac"].update_info(None, info["javac"]) - components["jar"].update_info(None, info["jar"]) - components["jbc2mpl"].update_info(maple_out_bin_path, info["jbc2mpl"]) + components["java2d8"].update_info(maple_out_bin_path, info["java2d8"]) + components["dex2mpl"].update_info(maple_out_bin_path, info["dex2mpl"]) components["maple"].update_info(maple_out_bin_path, info["maple"]) components["as"].update_info(gnu_bin_path, info["as"]) components["cc"].update_info(gnu_bin_path, info["cc"]) components["cxx"].update_info(gnu_bin_path, info["cxx"]) components["ld"].update_info(gnu_bin_path, info["ld"]) - components["javac"].update_info(None, javac_options) - components["jar"].update_info(None, jar_options) components["as"].update_info(None, as_options) components["cc"].update_info(None, cc_options) components["cxx"].update_info(None, cxx_options) components["ld"].update_info(None, linker_options) - # ------------------------------------------------------------------------ # # Select compile phase: "javac", "jar", "maple", "as", "ld" # # ----------------------------------------------------------------------- def do_update(components, file_type): - if file_type == "javac": - components.pop("jar") - components.pop("jbc2mpl") - components.pop("maple") - components.pop("as") - components.pop("cc") - components.pop("cxx") - components.pop("ld") - elif file_type == "jar": - components.pop("jbc2mpl") + if file_type == "java2d8": + components.pop("dex2mpl") components.pop("maple") components.pop("as") components.pop("cc") components.pop("cxx") components.pop("ld") - elif file_type == "jbc2mpl": + elif file_type == "dex2mpl": components.pop("maple") components.pop("as") components.pop("cc") @@ -340,9 +326,8 @@ def main(): # initial all tool chain components: # set the default name, input suffix, output suffix, and if it support multi-inputs components = collections.OrderedDict() - components["javac"] = Javac("/usr/bin/javac", ".java", ".class", "") - components["jar"] = Jar("/usr/bin/jar", ".class", ".jar", "") - components["jbc2mpl"] = SingleCompiler("jbc2mpl", ".jar", ".mpl", "") + components["java2d8"] = SingleCompiler("java2d8", ".java", ".dex", "") + components["dex2mpl"] = SingleCompiler("dex2mpl", ".dex", ".mpl", "") components["maple"] = SingleCompiler("maple", ".mpl", ".VtableImpl.s", "") components["as"] = MultiCompiler("clang++", ".s", ".o", "") components["cc"] = MultiCompiler("clang", ".c", ".o", "") diff --git a/test/testsuite/ouroboros/test.cfg b/test/testsuite/ouroboros/test.cfg index 9fc0522ae09464e771d5d375894927c2c1db653e..08fe53d1a8bfa927c0c9e7bd3220b3483ff07adb 100644 --- a/test/testsuite/ouroboros/test.cfg +++ b/test/testsuite/ouroboros/test.cfg @@ -3,8 +3,11 @@ java = // [internal-var] maple = python3 ${MAPLE_ROOT}/test/testsuite/maple.py + run = python3 ${MAPLE_ROOT}/test/testsuite/run.py -build_option = --javac="-bootclasspath ${MAPLE_ROOT}/output/ops/third_party/JAVA_LIBRARIES/core-oj.com.android.art_intermediates/classes.jar:${MAPLE_ROOT}/output/ops/third_party/JAVA_LIBRARIES/core-libart.com.android.art_intermediates/classes.jar:${MAPLE_ROOT}/output/ops/third_party/JAVA_LIBRARIES/services_intermediates/classes.jar:." --jbc2mpl="-mplt ${MAPLE_ROOT}/libjava-core/libcore-all.mplt -dumpPragma -use-string-factory" --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_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" + run_option = [description]