diff options
| author | ruki <[email protected]> | 2024-01-24 22:39:30 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-01-25 12:09:59 +0800 |
| commit | fec77395b2f96bac0bde5cd4d79115fd6d4b377e (patch) | |
| tree | 7d7cec18c2db28b41c0c547a72dfed366a0b439b /xmake/rules/c++/xmake.lua | |
| parent | c6445c7e401b348c5ca8afce229a1f4f45e9cf61 (diff) | |
split c and c++ languages
Diffstat (limited to 'xmake/rules/c++/xmake.lua')
| -rw-r--r-- | xmake/rules/c++/xmake.lua | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/xmake/rules/c++/xmake.lua b/xmake/rules/c++/xmake.lua index 80d2e1417..dedb63ed5 100644 --- a/xmake/rules/c++/xmake.lua +++ b/xmake/rules/c++/xmake.lua @@ -46,10 +46,35 @@ rule("c++.build") end end) +rule("c") + + -- add build rules + add_deps("c.build") + + -- set compiler runtime, e.g. vs runtime + add_deps("utils.compiler.runtime") + + -- inherit links and linkdirs of all dependent targets by default + add_deps("utils.inherit.links") + + -- support `add_files("src/*.o")` and `add_files("src/*.a")` to merge object and archive files to target + add_deps("utils.merge.object", "utils.merge.archive") + + -- we attempt to extract symbols to the independent file and + -- strip self-target binary if `set_symbols("debug")` and `set_strip("all")` are enabled + add_deps("utils.symbols.extract") + + -- add platform rules + add_deps("platform.wasm") + add_deps("platform.windows") + + -- add linker rules + add_deps("linker") + rule("c++") -- add build rules - add_deps("c++.build", "c.build") + add_deps("c++.build") -- set compiler runtime, e.g. vs runtime add_deps("utils.compiler.runtime") |
