diff --git a/src/BUILD.gn b/src/BUILD.gn index df5383bd8f6a3c1539ac70a3ee78dbcefad7cb93..4b8a86442e48099ea2a39ecd14e20e965dcb3c76 100644 --- a/src/BUILD.gn +++ b/src/BUILD.gn @@ -16,7 +16,7 @@ config("mapleallcompilecfg") { cflags_cc = [] cflags_cc += [ "-std=c++14", - "-Werror", + "-fno-common", "-DTARGAARCH64", ] diff --git a/src/bin/maple b/src/bin/maple index 75aece5c09d8464c7b132e1f2edb1edc291794ce..0b31ff486ecb0f187301f4edd3633f5fad6874b7 100755 Binary files a/src/bin/maple and b/src/bin/maple differ diff --git a/src/huawei_secure_c/BUILD.gn b/src/huawei_secure_c/BUILD.gn index d4a337f30d001e36cd9a8c92292ecd715542bf7b..c2f07b90187ebc5bdc969699eef100ace07d9057 100644 --- a/src/huawei_secure_c/BUILD.gn +++ b/src/huawei_secure_c/BUILD.gn @@ -62,5 +62,5 @@ include_common = [ static_library("libHWSecureC") { sources = src_libHWSecureC include_dirs = include_common - output_dir = "${root_out_dir}/lib/${HOST_ARCH}" + output_dir = "${root_out_dir}/ar" } diff --git a/src/maple_be/BUILD.gn b/src/maple_be/BUILD.gn index 256adece139ffc2b86bb82ab182092708365bc59..56589ac8dbad6bd7fc3393ef0e91e9ee76240756 100644 --- a/src/maple_be/BUILD.gn +++ b/src/maple_be/BUILD.gn @@ -111,7 +111,6 @@ src_libcg = [ deps_libcg = [] deps_libcg += [ ":libcgaarch64" ] -cflags_cc += [ "-DTARGAARCH64" ] cflags_cc -= [ "-DRC_NO_MMAP" ] cflags_cc -= [ "-DMIR_JAVA=1" ] @@ -120,7 +119,7 @@ configs = [ "${MAPLEALL_ROOT}:mapleallcompilecfg" ] static_library("libmplad") { sources = src_libmplad include_dirs = include_directories - output_dir = "${root_out_dir}/lib/${HOST_ARCH}" + output_dir = "${root_out_dir}/ar" cflags_cc += [ "-DRC_NO_MMAP" ] } @@ -138,7 +137,7 @@ static_library("libmplbe") { sources = src_libmplbe deps = deps_libmplbe include_dirs = include_directories - output_dir = "${root_out_dir}/lib/${HOST_ARCH}" + output_dir = "${root_out_dir}/ar" } source_set("libcgaarch64") { @@ -150,7 +149,7 @@ static_library("libcg") { sources = src_libcg include_dirs = include_directories deps = deps_libcg - output_dir = "${root_out_dir}/lib/${HOST_ARCH}" + output_dir = "${root_out_dir}/ar" } executable("maplegen") { diff --git a/src/maple_driver/BUILD.gn b/src/maple_driver/BUILD.gn index 57fe6029dcbb58e27c564d859148d511a7619ce2..194f035ec2114a4d4d057576f5ba9eb304896839 100644 --- a/src/maple_driver/BUILD.gn +++ b/src/maple_driver/BUILD.gn @@ -14,10 +14,7 @@ # configs = [ "${MAPLEALL_ROOT}:mapleallcompilecfg" ] -cflags_cc += [ - "-DTARGAARCH64", - "-DMAPLE_ROOT=\"${MAPLE_ROOT}\"", -] +cflags_cc += [ "-DMAPLE_ROOT=\"${MAPLE_ROOT}\"" ] include_directories = [ "${MAPLEALL_ROOT}", @@ -85,7 +82,7 @@ static_library("libdriver_option") { include_dirs = [ "${MAPLEALL_ROOT}/maple_driver/include" ] - output_dir = "${root_out_dir}/lib/${HOST_ARCH}" + output_dir = "${root_out_dir}/ar" } static_library("liboption_parser") { diff --git a/src/maple_ipa/BUILD.gn b/src/maple_ipa/BUILD.gn index 0715afab099ef82e62dd2d90cc26d55d7b89e26d..01c1a14217e668dc215e697c7a391a7ddefb4eed 100644 --- a/src/maple_ipa/BUILD.gn +++ b/src/maple_ipa/BUILD.gn @@ -37,5 +37,5 @@ configs = [ "${MAPLEALL_ROOT}:mapleallcompilecfg" ] static_library("libmplipa") { sources = src_libmplipa include_dirs = include_directories - output_dir = "${root_out_dir}/lib/${HOST_ARCH}" + output_dir = "${root_out_dir}/ar" } diff --git a/src/maple_ir/BUILD.gn b/src/maple_ir/BUILD.gn index a002c51d80283c55bee79c2469a0d8930fc8db72..5c573bccfa3e0b4c23d669a93f62f5eb386ba76c 100644 --- a/src/maple_ir/BUILD.gn +++ b/src/maple_ir/BUILD.gn @@ -56,7 +56,7 @@ cflags_cc += [ "-DSTORE_BACK_VTABLE_REF_AFTER_LOAD=1" ] static_library("libmplir") { sources = src_libmplir include_dirs = include_directories - output_dir = "${root_out_dir}/lib/${HOST_ARCH}" + output_dir = "${root_out_dir}/ar" libs = [] libs += [ "${OPENSOURCE_DEPS}/libmplutil.a" ] deps = [ diff --git a/src/maple_me/BUILD.gn b/src/maple_me/BUILD.gn index 01e63614ffc6db844e1aa1f57288d294fe0fdba3..e72b446af809d1e2ecf9a83ac9fede5fefad70e6 100644 --- a/src/maple_me/BUILD.gn +++ b/src/maple_me/BUILD.gn @@ -96,7 +96,7 @@ configs = [ "${MAPLEALL_ROOT}:mapleallcompilecfg" ] static_library("libmplme") { sources = src_libmplme include_dirs = include_directories - output_dir = "${root_out_dir}/lib/${HOST_ARCH}" + output_dir = "${root_out_dir}/ar" } static_library("libmplmewpo") { diff --git a/src/mpl2mpl/BUILD.gn b/src/mpl2mpl/BUILD.gn index 9303c664e08ea4979ab75c27be2fc580a5c37a09..2a54c021632b063d7e8a067f83bc690ac4ff1b30 100644 --- a/src/mpl2mpl/BUILD.gn +++ b/src/mpl2mpl/BUILD.gn @@ -45,5 +45,5 @@ configs = [ "${MAPLEALL_ROOT}:mapleallcompilecfg" ] static_library("libmpl2mpl") { sources = src_libmpl2mpl include_dirs = include_directories - output_dir = "${root_out_dir}/lib/${HOST_ARCH}" + output_dir = "${root_out_dir}/ar" } diff --git a/src/mpl2mpl/src/vtable_impl.cpp b/src/mpl2mpl/src/vtable_impl.cpp index df3e65239eab94f9dc4a4fcc7c9d3fa720612084..fa13552b70ac0322fe606a9f2bdcdab081ced8d5 100644 --- a/src/mpl2mpl/src/vtable_impl.cpp +++ b/src/mpl2mpl/src/vtable_impl.cpp @@ -19,7 +19,9 @@ // This phase is mainly to lower interfacecall into icall namespace { -#ifdef USE_32BIT_REF +#if USE_ARM32_MACRO +constexpr char kInterfaceMethod[] = "MCC_getFuncPtrFromItabSecondHash32"; +#elif USE_32BIT_REF constexpr char kInterfaceMethod[] = "MCC_getFuncPtrFromItab"; #else constexpr char kInterfaceMethod[] = "MCC_getFuncPtrFromItabSecondHash64"; @@ -193,7 +195,11 @@ void VtableImpl::ItabProcess(StmtNode &stmt, const ResolveFuncNode &resolveNode, CHECK_FATAL(currentFuncMpAllocator != nullptr, "null ptr check"); MapleVector opnds(currentFuncMpAllocator->Adapter()); opnds.push_back(builder->CreateExprRegread(PTY_ptr, pregItabAddress)); +#ifdef USE_ARM32_MACRO + opnds.push_back(builder->CreateIntConst(secondHashCode, PTY_u32)); +#else opnds.push_back(builder->CreateIntConst(secondHashCode, PTY_u64)); +#endif UStrIdx strIdx = GlobalTables::GetUStrTable().GetOrCreateStrIdxFromName(signature); MemPool *currentFunMp = builder->GetCurrentFuncCodeMp(); CHECK_FATAL(currentFunMp != nullptr, "null ptr check");