diff options
| author | ruki <[email protected]> | 2025-12-02 16:16:13 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-02 16:16:13 +0800 |
| commit | bc7caf95a9cfdefed930937e8450997a4cdc8191 (patch) | |
| tree | de6f77256d55a0f49c5889b10b3962a6406673a8 /xmake/rules/objc++/xmake.lua | |
| parent | f4533a6c109732c983329d5121929b9635409a3d (diff) | |
| parent | 73e234824c235191f430400f4bb7b39421ee1fb4 (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.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}) |
