gn process change

Signed-off-by: fangting <fangting12@huawei.com>
This commit is contained in:
fangting 2024-06-04 14:49:36 +08:00
parent 342b950cf2
commit f0d5d09b9b
4 changed files with 17 additions and 10 deletions

View File

@ -1194,14 +1194,15 @@ ohos_source_set("libark_jsruntime_static") {
public_configs = [ "$js_root:ark_jsruntime_public_config" ]
if ((current_cpu == "amd64" || current_cpu == "x64" ||
current_cpu == "x86_64" || current_cpu == "arm64") && !is_mingw &&
!is_mac && target_os != "ios") {
deps += [ "ecmascript/compiler:libark_stub_set" ]
} else {
deps += [ "$js_root/ecmascript/compiler:libark_mock_stub_set" ]
if (!is_ohos) {
if ((current_cpu == "amd64" || current_cpu == "x64" ||
current_cpu == "x86_64" || current_cpu == "arm64") && !is_mingw &&
!is_mac && target_os != "ios") {
deps += [ "ecmascript/compiler:libark_stub_set" ]
} else {
deps += [ "$js_root/ecmascript/compiler:libark_mock_stub_set" ]
}
}
part_name = "ets_runtime"
subsystem_name = "arkcompiler"
}

View File

@ -22,8 +22,10 @@
#include "ecmascript/js_file_path.h"
#include "ecmascript/platform/file.h"
#ifndef PANDA_TARGET_OHOS
extern const uint8_t _binary_stub_an_start[];
extern const uint32_t _binary_stub_an_length;
#endif
namespace panda::ecmascript {
void StubFileInfo::Save(const std::string &filename, Triple triple)
@ -115,7 +117,7 @@ bool StubFileInfo::MmapLoad(const std::string &fileName)
LOG_COMPILER(INFO) << "loaded stub file successfully";
return true;
}
#ifndef PANDA_TARGET_OHOS
bool StubFileInfo::Load()
{
if (_binary_stub_an_length <= 1) {
@ -159,7 +161,7 @@ bool StubFileInfo::Load()
}
return true;
}
#endif
const std::vector<ElfSecName> &StubFileInfo::GetDumpSectionNames()
{
static const std::vector<ElfSecName> secNames = {

View File

@ -109,7 +109,9 @@ private:
static constexpr uint32_t ASMSTUB_MODULE_NUM = 4;
bool MmapLoad(const std::string &fileName);
#ifndef PANDA_TARGET_OHOS
bool Load();
#endif
const std::vector<ElfSecName> &GetDumpSectionNames();
void *asmStubAddr_ {nullptr};
size_t asmStubSize_ {0};

View File

@ -14,5 +14,7 @@
*/
#include <cstdint>
#ifndef PANDA_TARGET_OHOS
extern const uint8_t _binary_stub_an_start[1] = {0x0};
extern const uint32_t _binary_stub_an_length = 1;
extern const uint32_t _binary_stub_an_length = 1;
#endif