diff --git a/build/core/jbc2mpl.mk b/build/core/jbc2mpl.mk deleted file mode 100644 index 2aa542b9a3e818aeeddbfeaf46de462030f9442c..0000000000000000000000000000000000000000 --- a/build/core/jbc2mpl.mk +++ /dev/null @@ -1,2 +0,0 @@ -$(APP_MPL): %.mpl : %.jar $(JBC2MPL_BIN) $(LIB_CORE_MPLT) - $(JBC2MPL_BIN) --mplt $(LIB_CORE_MPLT) -injar $(APP_JAR) -out $(APP) diff --git a/build/core/maple_test.mk b/build/core/maple_test.mk index 7c2b38fe53f73b57b9ca2b9f19b8816ea533216c..e27eb7378cb655d4f867576a05ae165dd963d39f 100644 --- a/build/core/maple_test.mk +++ b/build/core/maple_test.mk @@ -2,7 +2,6 @@ include $(MAPLE_BUILD_CORE)/maple_variables.mk test: $(APP_S) include $(MAPLE_BUILD_CORE)/mplcomb.mk -include $(MAPLE_BUILD_CORE)/jbc2mpl.mk include $(MAPLE_BUILD_CORE)/genmplt.mk include $(MAPLE_BUILD_CORE)/java2jar.mk diff --git a/build/core/maple_variables.mk b/build/core/maple_variables.mk index 2b8127de08bd50a18c4a65e870c3f9b1369616d9..a2b6edc72c6d5d5ff7b575b7e9ec5b7b09631e8e 100644 --- a/build/core/maple_variables.mk +++ b/build/core/maple_variables.mk @@ -13,8 +13,3 @@ JAVA2JAR := $(MAPLE_ROOT)/output/bin/java2jar JBC2MPL_BIN := $(MAPLE_ROOT)/output/bin/jbc2mpl MAPLE_BIN := $(MAPLE_ROOT)/output/bin/maple MPLCG_BIN := $(MAPLE_ROOT)/output/bin/mplcg -MPLME_FLAGS := --quiet -MPL2MPL_FLAGS := --quiet --regnativefunc --maplelinker -MPLCG_SO_FLAGS := --fpic -MPLCG_FLAGS := --quiet --no-pie --verbose-asm --maplelinker -MPLCOMBO_FLAGS := --run=me:mpl2mpl:mplcg --option="$(MPLME_FLAGS):$(MPL2MPL_FLAGS):$(MPLCG_FLAGS) $(MPLCG_SO_FLAGS)" diff --git a/build/core/mplcomb.mk b/build/core/mplcomb.mk index 9db0bc152e810eb6bec5c3e5e31e88095723d8d1..4e740119350a45b77e96f86b51c3bd25147d6c19 100644 --- a/build/core/mplcomb.mk +++ b/build/core/mplcomb.mk @@ -1,3 +1,2 @@ -$(APP_S): %.VtableImpl.s : %.mpl $(MAPLE_BIN) $(MPLCG_BIN) - $(MAPLE_BIN) --infile $< $(MPLCOMBO_FLAGS) --save-temps - +$(APP_S): %.VtableImpl.s : %.jar $(MAPLE_BIN) $(JBC2MPL_BIN) $(MPLCG_BIN) $(LIB_CORE_MPLT) + $(MAPLE_BIN) -O0 --mplt $(LIB_CORE_MPLT) $< diff --git a/src/bin/maple b/src/bin/maple index 6cbaac7585ed053bb2ed0b949952f0bf77c522d8..ffa9f86ca6c64fecfd52fde40422533941a167ec 100755 Binary files a/src/bin/maple and b/src/bin/maple differ diff --git a/src/maple_driver/defs/default/O0_options_mpl2mpl.def b/src/maple_driver/defs/default/O0_options_mpl2mpl.def index 29a13af4f26865b39f5d1373ccca78d8368a9084..f6c8080a0a5604fa5d52d155b7e25542450c322b 100644 --- a/src/maple_driver/defs/default/O0_options_mpl2mpl.def +++ b/src/maple_driver/defs/default/O0_options_mpl2mpl.def @@ -1,5 +1,5 @@ /* - * Copyright (c) [2019] Huawei Technologies Co.,Ltd.All rights reserved. + * Copyright (c) [2019-2020] Huawei Technologies Co.,Ltd.All rights reserved. * * OpenArkCompiler is licensed under the Mulan PSL v1. * You can use this software according to the terms and conditions of the Mulan PSL v1. @@ -16,3 +16,4 @@ { "--quiet", "", "", false, "", false }, { "-regnativefunc", "", "", false, "", false }, { "--maplelinker", "", "", false, "", false }, +{ "--emitVtableImpl", "", "", false, "", false }, diff --git a/src/maple_driver/src/jbc2mpl_compiler.cpp b/src/maple_driver/src/jbc2mpl_compiler.cpp index 56e60214692992ec4fc5820ddc5f9e2fb1e7f318..02c75f96c368c7f635c35e8e55b740ec5f31f930 100644 --- a/src/maple_driver/src/jbc2mpl_compiler.cpp +++ b/src/maple_driver/src/jbc2mpl_compiler.cpp @@ -28,11 +28,13 @@ DefaultOption Jbc2MplCompiler::GetDefaultOptions(const MplOptions&) const { void Jbc2MplCompiler::GetTmpFilesToDelete(const MplOptions &mplOptions, std::vector &tempFiles) const { tempFiles.push_back(mplOptions.GetOutputFolder() + mplOptions.GetOutputName() + ".mpl"); + tempFiles.push_back(mplOptions.GetOutputFolder() + mplOptions.GetOutputName() + ".mplt"); } std::unordered_set Jbc2MplCompiler::GetFinalOutputs(const MplOptions &mplOptions) const { std::unordered_set finalOutputs; finalOutputs.insert(mplOptions.GetOutputFolder() + mplOptions.GetOutputName() + ".mpl"); + finalOutputs.insert(mplOptions.GetOutputFolder() + mplOptions.GetOutputName() + ".mplt"); return finalOutputs; } } // namespace maple diff --git a/src/maple_driver/src/mplcg_compiler.cpp b/src/maple_driver/src/mplcg_compiler.cpp index 09b63d2b6bfaf35c1415a26ca45ec22722b1d90f..961e86b46fd1fccc16d91126cbb880fa06b9270a 100644 --- a/src/maple_driver/src/mplcg_compiler.cpp +++ b/src/maple_driver/src/mplcg_compiler.cpp @@ -41,6 +41,7 @@ std::string MplcgCompiler::GetInputFileName(const MplOptions &options) const { return options.GetInputFiles(); } } + // Get base file name auto idx = options.GetOutputName().find(".VtableImpl"); std::string outputName = options.GetOutputName(); if (idx != std::string::npos) {