From f61a1246c356897d5dc543e58a3e8a554190d8f5 Mon Sep 17 00:00:00 2001 From: Wen HU Date: Fri, 22 Apr 2022 15:59:15 -0400 Subject: [PATCH 1/4] move handling of language specific builtin types from ast_info to typetable --- src/MapleFE/astopt/include/ast_info.h | 6 ---- src/MapleFE/astopt/src/ast_info.cpp | 46 ++------------------------ src/MapleFE/astopt/src/ast_ti.cpp | 2 +- src/MapleFE/shared/include/typetable.h | 5 +++ src/MapleFE/shared/src/Makefile | 2 +- src/MapleFE/shared/src/typetable.cpp | 31 +++++++++++++++++ 6 files changed, 41 insertions(+), 51 deletions(-) diff --git a/src/MapleFE/astopt/include/ast_info.h b/src/MapleFE/astopt/include/ast_info.h index 83a0fc3712..e040caf7a0 100644 --- a/src/MapleFE/astopt/include/ast_info.h +++ b/src/MapleFE/astopt/include/ast_info.h @@ -46,7 +46,6 @@ class AST_INFO { std::unordered_set mWithTypeParamNodeSet; std::unordered_set mWithThisFuncSet;; std::unordered_set mFromLambda; - std::unordered_map mStrIdx2TypeIdxMap; void AddField(unsigned nid, TreeNode *node); @@ -108,11 +107,6 @@ class AST_INFO { void AddFromLambda(unsigned nid) { mFromLambda.insert(nid); } bool IsFromLambda(unsigned nid) { return mFromLambda.find(nid) != mFromLambda.end(); } - - void AddBuiltInTypes(); - bool IsBuiltInType(TreeNode *node); - unsigned GetBuiltInTypeIdx(unsigned stridx); - unsigned GetBuiltInTypeIdx(TreeNode *node); }; class FillNodeInfoVisitor : public AstVisitor { diff --git a/src/MapleFE/astopt/src/ast_info.cpp b/src/MapleFE/astopt/src/ast_info.cpp index 5c8ef881ec..3bd89023e0 100644 --- a/src/MapleFE/astopt/src/ast_info.cpp +++ b/src/MapleFE/astopt/src/ast_info.cpp @@ -32,8 +32,6 @@ void AST_INFO::CollectInfo() { it->SetParent(module); } - AddBuiltInTypes(); - // collect import/export info MSGNOLOC0("============== XXport info =============="); mHandler->GetASTXXport()->CollectXXportInfo(mHandler->GetHidx()); @@ -73,44 +71,6 @@ void AST_INFO::CollectInfo() { func_visitor.Visit(module); } -void AST_INFO::AddBuiltInTypes() { - unsigned size = gTypeTable.size(); - for (unsigned idx = 1; idx < size; idx++) { - TreeNode *node = gTypeTable.GetTypeFromTypeIdx(idx); - if (node->IsUserType()) { - mStrIdx2TypeIdxMap[node->GetStrIdx()] = node->GetTypeIdx(); - } - } - - // add language builtin types - TreeNode *node = NULL; - unsigned stridx = 0; -#define BUILTIN(T) \ - stridx = gStringPool.GetStrIdx(#T);\ - if (mStrIdx2TypeIdxMap.find(stridx) == mStrIdx2TypeIdxMap.end()) {\ - node = gTypeTable.CreateBuiltinType(#T, TY_Class);\ - gTypeTable.AddType(node);\ - mStrIdx2TypeIdxMap[stridx] = node->GetTypeIdx();\ - } -#include "lang_builtin.def" -} - -bool AST_INFO::IsBuiltInType(TreeNode *node) { - return mStrIdx2TypeIdxMap.find(node->GetStrIdx()) != mStrIdx2TypeIdxMap.end(); -} - -unsigned AST_INFO::GetBuiltInTypeIdx(unsigned stridx) { - if (mStrIdx2TypeIdxMap.find(stridx) != mStrIdx2TypeIdxMap.end()) { - return mStrIdx2TypeIdxMap[stridx]; - } - return 0; -} - -unsigned AST_INFO::GetBuiltInTypeIdx(TreeNode *node) { - unsigned stridx = node->GetStrIdx(); - return GetBuiltInTypeIdx(stridx); -} - TypeId AST_INFO::GetTypeId(TreeNode *node) { return node->GetTypeId(); } @@ -438,7 +398,7 @@ IdentifierNode *AST_INFO::CreateIdentifierNode(unsigned stridx) { } UserTypeNode *AST_INFO::CreateUserTypeNode(unsigned stridx, ASTScope *scope) { - unsigned tidx = GetBuiltInTypeIdx(stridx); + unsigned tidx = gTypeTable.GetBuiltInTypeIdx(stridx); IdentifierNode *node = CreateIdentifierNode(stridx); SetTypeId(node, TY_Class); SetTypeIdx(node, tidx); @@ -692,7 +652,7 @@ FunctionNode *FillNodeInfoVisitor::VisitFunctionNode(FunctionNode *node) { mInfo->SetTypeIdx(node, type->GetTypeIdx()); } else if (node->IsGenerator()) { unsigned stridx = gStringPool.GetStrIdx("Generator"); - unsigned tidx = mInfo->GetBuiltInTypeIdx(stridx); + unsigned tidx = gTypeTable.GetBuiltInTypeIdx(stridx); UserTypeNode *ut = mInfo->CreateUserTypeNode(stridx); node->SetRetType(ut); } @@ -766,7 +726,7 @@ UserTypeNode *FillNodeInfoVisitor::VisitUserTypeNode(UserTypeNode *node) { (void) AstVisitor::VisitUserTypeNode(node); TreeNode *id = node->GetId(); if (id) { - unsigned tidx = mInfo->GetBuiltInTypeIdx(id); + unsigned tidx = gTypeTable.GetBuiltInTypeIdx(id); if (tidx) { mInfo->SetTypeIdx(id, tidx); } diff --git a/src/MapleFE/astopt/src/ast_ti.cpp b/src/MapleFE/astopt/src/ast_ti.cpp index 99439b59de..930230e293 100644 --- a/src/MapleFE/astopt/src/ast_ti.cpp +++ b/src/MapleFE/astopt/src/ast_ti.cpp @@ -136,7 +136,7 @@ FieldLiteralNode *BuildIdDirectFieldVisitor::VisitFieldLiteralNode(FieldLiteralN IdentifierNode *field = static_cast(name); TreeNode *decl = mHandler->FindDecl(field); TreeNode *vtype = GetParentVarClass(decl); - if (vtype && !mHandler->GetINFO()->IsBuiltInType(vtype)) { + if (vtype && !gTypeTable.IsBuiltInType(vtype)) { // check if decl is a field of vtype // note: vtype could be in different module Module_Handler *h = mHandler->GetModuleHandler(vtype); diff --git a/src/MapleFE/shared/include/typetable.h b/src/MapleFE/shared/include/typetable.h index d53b177191..8e6b37b40e 100644 --- a/src/MapleFE/shared/include/typetable.h +++ b/src/MapleFE/shared/include/typetable.h @@ -53,6 +53,7 @@ private: std::vector mTypeTable; std::unordered_map mNodeId2TypeIdxMap; std::unordered_map mTypeId2TypeMap; + std::unordered_map mStrIdx2BuiltInTypeIdxMap; std::unordered_set mPrimTypeId; std::unordered_set mFuncTypeIdx; unsigned mPrimSize; @@ -74,6 +75,10 @@ public: void AddPrimAndBuiltinTypes(); bool AddType(TreeNode *node); + bool IsBuiltInType(TreeNode *node); + unsigned GetBuiltInTypeIdx(unsigned stridx); + unsigned GetBuiltInTypeIdx(TreeNode *node); + TypeEntry *GetTypeEntryFromTypeIdx(unsigned tidx); TreeNode *GetTypeFromTypeIdx(unsigned tidx); TreeNode *GetTypeFromTypeId(TypeId tid) { return mTypeId2TypeMap[tid]; } diff --git a/src/MapleFE/shared/src/Makefile b/src/MapleFE/shared/src/Makefile index e09a8359da..b784761fdd 100644 --- a/src/MapleFE/shared/src/Makefile +++ b/src/MapleFE/shared/src/Makefile @@ -36,7 +36,7 @@ ASTSRCG:=$(wildcard ${GENASTDIR}/*.cpp) ASTOBJG:=$(patsubst %.cpp,%.o,$(ASTSRCG)) ASTDEPG:=$(patsubst %.cpp,%.d,$(ASTSRCG)) -INCLUDES := -I $(MAPLEFE_ROOT)/shared/include -I ${GENASTDIR} -I ${GENDIR} +INCLUDES := -I $(MAPLEFE_ROOT)/shared/include -I ${GENASTDIR} -I ${GENDIR} -I $(MAPLEFE_ROOT)/$(SRCLANG)/include SHAREDLIB := shared.a GENASTLIB := genast.a diff --git a/src/MapleFE/shared/src/typetable.cpp b/src/MapleFE/shared/src/typetable.cpp index 8a1d8a93e9..ae6771c292 100644 --- a/src/MapleFE/shared/src/typetable.cpp +++ b/src/MapleFE/shared/src/typetable.cpp @@ -79,6 +79,7 @@ TreeNode *TypeTable::CreateBuiltinType(std::string name, TypeId tid) { id->SetParent(utype); mTypeId2TypeMap[tid] = utype; + mStrIdx2BuiltInTypeIdxMap[stridx] = tid; return utype; } @@ -132,9 +133,39 @@ void TypeTable::AddPrimAndBuiltinTypes() { #include "supported_types.def" mPreBuildSize = size(); + + // add language builtin types + unsigned stridx = 0; +#define BUILTIN(T) \ + stridx = gStringPool.GetStrIdx(#T);\ + if (mStrIdx2BuiltInTypeIdxMap.find(stridx) == mStrIdx2BuiltInTypeIdxMap.end()) {\ + node = CreateBuiltinType(#T, TY_Class);\ + AddType(node);\ + mStrIdx2BuiltInTypeIdxMap[stridx] = node->GetTypeIdx();\ + } +#include "lang_builtin.def" return; } +bool TypeTable::IsBuiltInType(TreeNode *node) { + return mStrIdx2BuiltInTypeIdxMap.find(node->GetStrIdx()) != mStrIdx2BuiltInTypeIdxMap.end(); +} + +unsigned TypeTable::GetBuiltInTypeIdx(unsigned stridx) { + if (mStrIdx2BuiltInTypeIdxMap.find(stridx) != mStrIdx2BuiltInTypeIdxMap.end()) { + return mStrIdx2BuiltInTypeIdxMap[stridx]; + } + return 0; +} + +unsigned TypeTable::GetBuiltInTypeIdx(TreeNode *node) { + unsigned stridx = node->GetStrIdx(); + if (mStrIdx2BuiltInTypeIdxMap.find(stridx) != mStrIdx2BuiltInTypeIdxMap.end()) { + return GetBuiltInTypeIdx(stridx); + } + return 0; +} + TypeEntry *TypeTable::GetTypeEntryFromTypeIdx(unsigned tidx) { MASSERT(tidx < mTypeTable.size() && "type index out of range"); return mTypeTable[tidx]; -- Gitee From 1b698bd0ed2c52cddb2b9dd18625d69253037eee Mon Sep 17 00:00:00 2001 From: Wen HU Date: Mon, 14 Nov 2022 10:34:59 -0800 Subject: [PATCH 2/4] adjust env --- src/MapleFE/Makefile.in | 4 ++-- src/MapleFE/README | 21 ++++++++++++++------- src/MapleFE/envsetup.sh | 7 ++----- src/MapleFE/scripts/build_mapleall.sh | 9 +-------- src/MapleFE/test/Makefile | 4 ++-- 5 files changed, 21 insertions(+), 24 deletions(-) diff --git a/src/MapleFE/Makefile.in b/src/MapleFE/Makefile.in index 9ec2c1ca52..12452eea58 100644 --- a/src/MapleFE/Makefile.in +++ b/src/MapleFE/Makefile.in @@ -10,11 +10,11 @@ LANG=java MKDIR_P = mkdir -p -MAPLELIBPATH:=$(MAPLE_ROOT)/OpenArkCompiler/output/aarch64-clang-debug/lib/64 +MAPLELIBPATH:=$(MAPLE_ROOT)/output/aarch64-clang-debug/lib/64 MAPLELIBS := -L $(MAPLELIBPATH) -lmplir -loption_parser -lmplphase -lmplutil -lmempool -lmpl2mpl -lHWSecureC -ldriver_option -lmplir -loption_parser -ldriver_option MAPLEALL_INC = -I $(MAPLEALL_SRC)/maple_ir/include \ -I $(MAPLEALL_SRC)/mempool/include \ -I $(MAPLEALL_SRC)/maple_util/include \ -I $(MAPLEALL_SRC)/maple_driver/include \ - -I $(MAPLEALL_ROOT)/third_party/bounds_checking_function/include + -I $(MAPLE_ROOT)/third_party/bounds_checking_function/include diff --git a/src/MapleFE/README b/src/MapleFE/README index 9446b57ff2..0d57667771 100644 --- a/src/MapleFE/README +++ b/src/MapleFE/README @@ -40,23 +40,30 @@ sudo npm install -g typescript@latest [How to build] -1. source envsetup.sh [java|typescript] +typescript +1. source envsetup.sh typescript +2. make +3. outputs: + output/typescript/bin/ts2ast - executable frontend + output/typescript/bin/ast2cpp - translate AST to cpp source code. + +java +1. source envsetup.sh java 2. make mapleall This step is to build mapleall (Maple IR related libraries). If you have done it once, you dont need do it again unless you changed the code in mapleall. 3. make -4. If you are working at Java frontend, you will see output/java/java/java2mpl. This is the executable - frontend. -4. If you are working at Typescript frontend, you will see output/typescript/bin/ts2ast. This is the executable - frontend. You can also see output/typescript/bin/ast2cpp, which translate AST to cpp source code. +4. outputs: + output/java/bin/java2ast - executable frontend + output/java/bin/ast2mpl - translate AST to mpl [How to test] 1. make test -run a single test, say t1.java: +run a single test, say add.ts: 1. cd test -2. make t1 +2. make add You can find all Java test cases in test/java. You can find all Typescript test cases in test/typescript. diff --git a/src/MapleFE/envsetup.sh b/src/MapleFE/envsetup.sh index bc75a54707..4f106000bc 100755 --- a/src/MapleFE/envsetup.sh +++ b/src/MapleFE/envsetup.sh @@ -40,13 +40,10 @@ fi export SRCLANG=$LANGSRC export MAPLEFE_ROOT=$(cd $(dirname ${BASH_SOURCE[0]}); pwd) -export MAPLE_ROOT=$(cd ${MAPLEFE_ROOT}/../../..; pwd) - -unset MAPLEALL_ROOT -export MAPLEALL_ROOT=${MAPLE_ROOT}/OpenArkCompiler +export MAPLE_ROOT=$(cd ${MAPLEFE_ROOT}/../..; pwd) unset MAPLEALL_SRC -export MAPLEALL_SRC=${MAPLEALL_ROOT}/src/mapleall +export MAPLEALL_SRC=${MAPLE_ROOT}/src/mapleall unset BUILDDIR export BUILDDIR=${MAPLEFE_ROOT}/output/${SRCLANG} diff --git a/src/MapleFE/scripts/build_mapleall.sh b/src/MapleFE/scripts/build_mapleall.sh index c1c5d7375c..63c03a79ee 100755 --- a/src/MapleFE/scripts/build_mapleall.sh +++ b/src/MapleFE/scripts/build_mapleall.sh @@ -15,14 +15,7 @@ set -e -if [ ! -d $MAPLEALL_ROOT ]; then - cd $MAPLE_ROOT - git clone https://gitee.com/openarkcompiler/OpenArkCompiler.git -b dev_MapleFE -fi - -cd $MAPLEALL_ROOT -git checkout dev_MapleFE -git pull +cd $MAPLE_ROOT source build/envsetup.sh arm debug make setup make clobber diff --git a/src/MapleFE/test/Makefile b/src/MapleFE/test/Makefile index aed83f9c0a..649363ecdf 100644 --- a/src/MapleFE/test/Makefile +++ b/src/MapleFE/test/Makefile @@ -76,8 +76,8 @@ mssetup: @cat -n $(build)/$@.mpl @echo "========================================================\n" @echo gdb --args ../output/java/java/java2mpl $(build)/$@.java $(FLAGS) - $(MAPLEALL_ROOT)/output/aarch64-clang-debug/bin/irbuild $(build)/$@.mpl - $(MAPLEALL_ROOT)/output/aarch64-clang-debug/bin/irbuild $(build)/$@.irb.mpl + $(MAPLE_ROOT)/output/aarch64-clang-debug/bin/irbuild $(build)/$@.mpl + $(MAPLE_ROOT)/output/aarch64-clang-debug/bin/irbuild $(build)/$@.irb.mpl diff -uwb $(build)/$@.irb.mpl $(build)/$@.irb.irb.mpl else ifeq ($(SRCLANG),typescript) -- Gitee From a6151028c642e7b9dc4c486ddcd997288fdf37fd Mon Sep 17 00:00:00 2001 From: Wen HU Date: Mon, 28 Nov 2022 12:31:00 -0800 Subject: [PATCH 3/4] delete cvt_block.[h|cpp] as it is done in ast_adj phase --- src/MapleFE/ast2mpl/include/cvt_block.h | 41 -------------- src/MapleFE/ast2mpl/src/ast2mpl_builder.cpp | 5 -- src/MapleFE/ast2mpl/src/cvt_block.cpp | 62 --------------------- 3 files changed, 108 deletions(-) delete mode 100644 src/MapleFE/ast2mpl/include/cvt_block.h delete mode 100644 src/MapleFE/ast2mpl/src/cvt_block.cpp diff --git a/src/MapleFE/ast2mpl/include/cvt_block.h b/src/MapleFE/ast2mpl/include/cvt_block.h deleted file mode 100644 index 99ac1da878..0000000000 --- a/src/MapleFE/ast2mpl/include/cvt_block.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -* Copyright (C) [2021] Futurewei Technologies, Inc. All rights reverved. -* -* OpenArkFE is licensed under the Mulan PSL v2. -* You can use this software according to the terms and conditions of the Mulan PSL v2. -* You may obtain a copy of Mulan PSL v2 at: -* -* http://license.coscl.org.cn/MulanPSL2 -* -* 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 Mulan PSL v2 for more details. -*/ - -#ifndef __AST_CVT_BLOCK_H__ -#define __AST_CVT_BLOCK_H__ - -#include "ast_module.h" -#include "ast.h" -#include "gen_astvisitor.h" - -namespace maplefe { - -// CvtBlockVisitor is to fix up some tree nodes after the AST is created -class CvtToBlockVisitor : public AstVisitor { - private: - ModuleNode *mASTModule; - bool mUpdated; - - public: - CvtToBlockVisitor(ModuleNode *m) : mASTModule(m), mUpdated(false) {} - - bool CvtToBlock(); - - CondBranchNode *VisitCondBranchNode(CondBranchNode *node); - ForLoopNode *VisitForLoopNode(ForLoopNode *node); -}; - -} -#endif diff --git a/src/MapleFE/ast2mpl/src/ast2mpl_builder.cpp b/src/MapleFE/ast2mpl/src/ast2mpl_builder.cpp index 2c8c3546f3..262a13bb48 100644 --- a/src/MapleFE/ast2mpl/src/ast2mpl_builder.cpp +++ b/src/MapleFE/ast2mpl/src/ast2mpl_builder.cpp @@ -18,7 +18,6 @@ #include "mir_module.h" #include "mir_function.h" #include "maplefe_mir_builder.h" -#include "cvt_block.h" namespace maplefe { @@ -77,10 +76,6 @@ void Ast2MplBuilder::Build() { std::cout << "============= in ProcessAST ===========" << std::endl; std::cout << "srcLang : " << module->GetSrcLangString() << std::endl; } - // pass 0: convert to use BlockNode for if-then-else and loop bodies - CvtToBlockVisitor visitor(module); - visitor.CvtToBlock(); - // pass 1: collect class/interface/function decl for (unsigned i = 0; i < module->GetTreesNum(); i++) { TreeNode *tnode = module->GetTree(i); diff --git a/src/MapleFE/ast2mpl/src/cvt_block.cpp b/src/MapleFE/ast2mpl/src/cvt_block.cpp deleted file mode 100644 index 419d1c54bd..0000000000 --- a/src/MapleFE/ast2mpl/src/cvt_block.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* -* Copyright (C) [2021] Futurewei Technologies, Inc. All rights reverved. -* -* OpenArkFE is licensed under the Mulan PSL v2. -* You can use this software according to the terms and conditions of the Mulan PSL v2. -* You may obtain a copy of Mulan PSL v2 at: -* -* http://license.coscl.org.cn/MulanPSL2 -* -* 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 Mulan PSL v2 for more details. -*/ - -#include "cvt_block.h" - -namespace maplefe { - -bool CvtToBlockVisitor::CvtToBlock() { - for (unsigned i = 0; i < mASTModule->GetTreesNum(); i++ ) { - TreeNode *it = mASTModule->GetTree(i); - Visit(it); - } - return mUpdated; -} - -// if-then-else -CondBranchNode *CvtToBlockVisitor::VisitCondBranchNode(CondBranchNode *node) { - TreeNode *tn = VisitTreeNode(node->GetTrueBranch()); - if (tn && !tn->IsBlock()) { - BlockNode *blk = (BlockNode*)gTreePool.NewTreeNode(sizeof(BlockNode)); - new (blk) BlockNode(); - blk->AddChild(tn); - node->SetTrueBranch(blk); - mUpdated = true; - } - tn = VisitTreeNode(node->GetFalseBranch()); - if (tn && !tn->IsBlock()) { - BlockNode *blk = (BlockNode*)gTreePool.NewTreeNode(sizeof(BlockNode)); - new (blk) BlockNode(); - blk->AddChild(tn); - node->SetFalseBranch(blk); - mUpdated = true; - } - return node; -} - -// for -ForLoopNode *CvtToBlockVisitor::VisitForLoopNode(ForLoopNode *node) { - TreeNode *tn = VisitTreeNode(node->GetBody()); - if (tn && !tn->IsBlock()) { - BlockNode *blk = (BlockNode*)gTreePool.NewTreeNode(sizeof(BlockNode)); - new (blk) BlockNode(); - blk->AddChild(tn); - node->SetBody(blk); - mUpdated = true; - } - return node; -} - -} -- Gitee From 5c76d186a756dacfd13d774abcbf994a15f6b6bd Mon Sep 17 00:00:00 2001 From: Wen HU Date: Mon, 28 Nov 2022 15:30:38 -0800 Subject: [PATCH 4/4] update Makefile for C --- src/MapleFE/Makefile | 4 ++-- src/MapleFE/ast2mpl/src/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/MapleFE/Makefile b/src/MapleFE/Makefile index f1dbcac61d..7ae81206d0 100644 --- a/src/MapleFE/Makefile +++ b/src/MapleFE/Makefile @@ -24,7 +24,7 @@ ifeq ($(SRCLANG),java) else ifeq ($(SRCLANG),typescript) TARGET := ts2ast ast2cpp obfuscate else ifeq ($(SRCLANG),c) - TARGET := c2ast + TARGET := c2ast ast2mpl endif all: $(TARGET) @@ -44,7 +44,7 @@ recdetect: autogen shared ladetect ladetect: autogen shared $(MAKE) LANG=$(SRCLANG) -C ladetect -ast2mpl: astopt java2ast +ast2mpl: astopt $(MAKE) -C ast2mpl astopt: shared recdetect ladetect diff --git a/src/MapleFE/ast2mpl/src/Makefile b/src/MapleFE/ast2mpl/src/Makefile index 51ab1dcd3e..22ca5983e7 100644 --- a/src/MapleFE/ast2mpl/src/Makefile +++ b/src/MapleFE/ast2mpl/src/Makefile @@ -48,7 +48,7 @@ INCLUDEGEN := -I $(MAPLEFE_ROOT)/shared/include -I $(BUILDDIR)/gen -I $(BUILDAST TARGET=ast2mpl SHAREDLIB = $(BUILDDIR)/astopt/astopt.a $(BUILDDIR)/shared/shared.a $(BUILDASTGEN)/genast.a -LANGSPEC=$(BUILDDIR)/java/lang_spec.o +LANGSPEC=$(BUILDDIR)/$(SRCLANG)/lang_spec.o .PHONY: all all: $(BUILDBIN)/$(TARGET) -- Gitee