summaryrefslogtreecommitdiff
path: root/xmake/rules/objc++/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-02 16:16:13 +0800
committerGitHub <[email protected]>2025-12-02 16:16:13 +0800
commitbc7caf95a9cfdefed930937e8450997a4cdc8191 (patch)
treede6f77256d55a0f49c5889b10b3962a6406673a8 /xmake/rules/objc++/xmake.lua
parentf4533a6c109732c983329d5121929b9635409a3d (diff)
parent73e234824c235191f430400f4bb7b39421ee1fb4 (diff)
Merge pull request #7088 from xmake-io/rule
Improve c++/objc rules
Diffstat (limited to 'xmake/rules/objc++/xmake.lua')
-rw-r--r--xmake/rules/objc++/xmake.lua24
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})