Only link asmjit if native DRCs are built.

This commit is contained in:
Vas Crabb 2025-05-01 23:31:40 +10:00
parent e9f0acb1fd
commit b4e1f5f1b5
2 changed files with 14 additions and 13 deletions

View File

@ -21,9 +21,10 @@ for i, v in ipairs(DRC_CPUS) do
break
end
end
CPU_INCLUDE_DRC_NATIVE = CPU_INCLUDE_DRC and (not _OPTIONS["FORCE_DRC_C_BACKEND"]) and ((_OPTIONS["PLATFORM"] == "x86") or (_OPTIONS["PLATFORM"] == "arm64"))
if (CPU_INCLUDE_DRC) then
if CPU_INCLUDE_DRC then
files {
MAME_DIR .. "src/devices/cpu/drcbec.cpp",
MAME_DIR .. "src/devices/cpu/drcbec.h",
@ -41,7 +42,8 @@ if (CPU_INCLUDE_DRC) then
MAME_DIR .. "src/devices/cpu/x86log.h",
MAME_DIR .. "src/devices/cpu/drcumlsh.h",
}
if (not _OPTIONS["FORCE_DRC_C_BACKEND"]) and ((_OPTIONS["PLATFORM"] == "x86") or (_OPTIONS["PLATFORM"] == "arm64")) then
end
if CPU_INCLUDE_DRC_NATIVE then
files {
MAME_DIR .. "src/devices/cpu/drcbearm64.cpp",
MAME_DIR .. "src/devices/cpu/drcbearm64.h",
@ -50,7 +52,6 @@ if (CPU_INCLUDE_DRC) then
MAME_DIR .. "src/devices/cpu/drcbex86.cpp",
MAME_DIR .. "src/devices/cpu/drcbex86.h",
}
end
end
--------------------------------------------------
@ -1295,7 +1296,7 @@ end
-- Beware that opt_tool can set the value, so we want both to be executed always
local want_disasm_i86 = opt_tool(CPUS, "I86")
local want_disasm_i386 = opt_tool(CPUS, "I386")
if want_disasm_i86 or want_disasm_i386 or CPU_INCLUDE_DRC then
if want_disasm_i86 or want_disasm_i386 or CPU_INCLUDE_DRC_NATIVE then
table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/i386/i386dasm.cpp")
table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/i386/i386dasm.h")
end

View File

@ -151,7 +151,7 @@ end
ext_lib("jpeg"),
"7z",
}
if not _OPTIONS["FORCE_DRC_C_BACKEND"] then
if CPU_INCLUDE_DRC_NATIVE then
links {
"asmjit",
}