From d7c725089bf07caa36323e6cf136a8ccd4db288a Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 13 Oct 2023 23:35:43 +0800 Subject: add simulator --- xmake/toolchains/xcode/load_applexros.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'xmake/toolchains/xcode') diff --git a/xmake/toolchains/xcode/load_applexros.lua b/xmake/toolchains/xcode/load_applexros.lua index f4f5ec596..61b142374 100644 --- a/xmake/toolchains/xcode/load_applexros.lua +++ b/xmake/toolchains/xcode/load_applexros.lua @@ -31,7 +31,8 @@ function main(toolchain) -- init target flags if target_minver then - local target = ("%s-apple-xros%s"):format(arch, target_minver) + local simulator = toolchain:config("appledev") == "simulator" + local target = (simulator and "%s-apple-xrsimulator%s" or "%s-apple-xros%s"):format(arch, target_minver) toolchain:add("cxflags", "-target", target) toolchain:add("mxflags", "-target", target) toolchain:add("asflags", "-target", target) @@ -44,8 +45,8 @@ function main(toolchain) -- init flags for c/c++ toolchain:add("cxflags", "-isysroot", xcode_sysroot) - toolchain:add("ldflags", "-ObjC", "-fobjc-link-runtime", "-isysroot", xcode_sysroot) - toolchain:add("shflags", "-ObjC", "-fobjc-link-runtime", "-isysroot", xcode_sysroot) + toolchain:add("ldflags", "-fobjc-link-runtime", "-isysroot", xcode_sysroot) + toolchain:add("shflags", "-fobjc-link-runtime", "-isysroot", xcode_sysroot) -- init flags for objc/c++ toolchain:add("mxflags", "-isysroot", xcode_sysroot) -- cgit v1.3.1