mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-04-19 10:51:18 +00:00
Disable alias attribute on macOS clang. (#19)
This commit is contained in:
parent
3ee19542c9
commit
dc4460eefd
@ -19,6 +19,11 @@ target_link_libraries(XenonRecomp PRIVATE
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
target_compile_options(XenonRecomp PRIVATE -Wno-switch -Wno-unused-variable -Wno-null-arithmetic)
|
||||
|
||||
# alias attribute not supported on Apple.
|
||||
if (NOT APPLE)
|
||||
target_compile_definitions(XenonRecomp PRIVATE XENON_RECOMP_USE_ALIAS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_compile_definitions(XenonRecomp PRIVATE _CRT_SECURE_NO_WARNINGS)
|
||||
|
@ -2358,7 +2358,10 @@ bool Recompiler::Recompile(const Function& fn)
|
||||
name = fmt::format("sub_{}", fn.base);
|
||||
}
|
||||
|
||||
#ifdef XENON_RECOMP_USE_ALIAS
|
||||
println("__attribute__((alias(\"__imp__{}\"))) PPC_WEAK_FUNC({});", name, name);
|
||||
#endif
|
||||
|
||||
println("PPC_FUNC_IMPL(__imp__{}) {{", name);
|
||||
println("\tPPC_FUNC_PROLOGUE();");
|
||||
|
||||
@ -2419,6 +2422,12 @@ bool Recompiler::Recompile(const Function& fn)
|
||||
|
||||
println("}}\n");
|
||||
|
||||
#ifndef XENON_RECOMP_USE_ALIAS
|
||||
println("PPC_WEAK_FUNC({}) {{", name);
|
||||
println("\t__imp__{}(ctx, base);", name);
|
||||
println("}}\n");
|
||||
#endif
|
||||
|
||||
std::swap(out, tempString);
|
||||
if (localVariables.ctr)
|
||||
println("\tPPCRegister ctr{{}};");
|
||||
|
Loading…
x
Reference in New Issue
Block a user