fix: fix build.
Some checks failed
Build / build (debug, map[arch:arm64 os:linux runner:ubuntu-24.04-arm toolchain:gcc-14]) (push) Has been cancelled
Build / build (debug, map[arch:arm64 os:macosx runner:macos-latest toolchain:xcode]) (push) Has been cancelled
Build / build (debug, map[arch:x64 os:windows runner:windows-latest toolchain:clang]) (push) Has been cancelled
Build / build (debug, map[arch:x86_64 os:linux runner:ubuntu-latest toolchain:gcc-14]) (push) Has been cancelled
Build / build (release, map[arch:arm64 os:linux runner:ubuntu-24.04-arm toolchain:gcc-14]) (push) Has been cancelled
Build / build (release, map[arch:arm64 os:macosx runner:macos-latest toolchain:xcode]) (push) Has been cancelled
Build / build (release, map[arch:x64 os:windows runner:windows-latest toolchain:clang]) (push) Has been cancelled
Build / build (release, map[arch:x86_64 os:linux runner:ubuntu-latest toolchain:gcc-14]) (push) Has been cancelled

This commit is contained in:
2025-08-22 02:10:17 +08:00
parent 4697e8487a
commit a47024f029
2 changed files with 17 additions and 30 deletions

View File

@@ -43,32 +43,12 @@ public:
constexpr Enum data() const { return m_data; }
constexpr std::string string() const {
using namespace util::string;
// clang-format off
switch (m_data) {
#define HSTR(x) \
case x: \
return #x;
HSTR(Function);
HSTR(CXXDeductionGuide);
HSTR(CXXMethod);
HSTR(CXXConstructor);
HSTR(CXXConversion);
HSTR(CXXDestructor);
HSTR(Var);
HSTR(Decomposition);
HSTR(ImplicitParam);
HSTR(OMPCapturedExpr);
HSTR(ParamVar);
HSTR(VarTemplateSpecialization);
#undef HSTR
default:
auto value = magic_enum::enum_name(m_data);
if (value.empty()) {
throw EnumCastException(m_data);
}
// clang-format on
return std::string(value);
}
constexpr bool operator==(const DeclType& other) const {

View File

@@ -27,11 +27,21 @@ option('symbol-resolver')
if option:value() == 'native' and not is_plat('windows') then
raise('the native symbol resolver does not support this platform.')
end
-- TODO: remove it.
-- The native symbol resolver is completely unavailable,
-- v1.12.0 Problem: RVA not subtracted from ImageBase.
-- v1.13.0 Problem: pl_resolve_symbol does not return the real function address, and needs to handle thunk.
if option:value() == 'native' then
raise('sorry use builtin symbol resolver please.')
end
end)
option_end()
if is_config('symbol-resolver', 'native') then
add_repositories("liteldev-free-repo https://github.com/liteldev-free/xmake-repo.git")
add_repositories('liteldev-free-repo https://github.com/liteldev-free/xmake-repo.git')
-- TODO: need to add an option to select the PreLoader version.
add_requires('preloader 1.13.0')
end
@@ -64,6 +74,7 @@ target('libdi')
'boost',
'nlohmann_json',
'openssl3',
'magic_enum',
{public = true}
)
@@ -100,10 +111,7 @@ target('askrva')
set_pcxxheader('src/pch.h')
add_deps('libdi')
add_packages(
'argparse',
'magic_enum'
)
add_packages('argparse')
if is_config('symbol-resolver', 'native') then
add_packages('preloader')
@@ -118,8 +126,7 @@ target('blob-extractor')
add_deps('libdi')
add_packages(
'argparse',
'nlohmann_json',
'magic_enum'
'nlohmann_json'
)
target('dumpsym')