diff options
Diffstat (limited to 'xmake/rules/objc++/xmake.lua')
| -rw-r--r-- | xmake/rules/objc++/xmake.lua | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/xmake/rules/objc++/xmake.lua b/xmake/rules/objc++/xmake.lua index fe857deef..23cdc3faa 100644 --- a/xmake/rules/objc++/xmake.lua +++ b/xmake/rules/objc++/xmake.lua @@ -21,30 +21,18 @@ -- define rule: objc.build rule("objc.build") set_sourcekinds("mm") - add_deps("objc.build.pcheader", "c.build.optimization", "objc.build.sanitizer") - after_load(function (target) - -- deprecated, we only need to use `add_mflags("-fno-objc-arc")` to override it - if target:values("objc.build.arc") == false then - target:add("mflags", "-fno-objc-arc") - end - if target:is_plat("macosx", "iphoneos", "watchos") then - target:add("frameworks", "Foundation", "CoreFoundation") - end + add_deps("objc.build.pcheader") + on_config(function (target) + import("config")(target, "mm") end) on_build_files("private.action.build.object", {jobgraph = true, batch = true, distcc = true}) -- define rule: objc++.build rule("objc++.build") set_sourcekinds("mxx") - add_deps("objc++.build.pcheader", "c++.build.optimization", "objc++.build.sanitizer") - after_load(function (target) - -- deprecated, we only need to use `add_mxxflags("-fno-objc-arc")` to override it - if target:values("objc++.build.arc") == false then - target:add("mxxflags", "-fno-objc-arc") - end - if target:is_plat("macosx", "iphoneos", "watchos") then - target:add("frameworks", "Foundation", "CoreFoundation") - end + add_deps("objc++.build.pcheader") + on_config(function (target) + import("config")(target, "mxx") end) on_build_files("private.action.build.object", {jobgraph = true, batch = true, distcc = true}) |
