summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-03-19 23:15:17 +0800
committerruki <[email protected]>2020-03-19 13:31:43 +0800
commit1933377f0050ac0b6722e5b598080323c75b6e41 (patch)
tree10125e87b5629f310920ea57a4d7f5a5ec126c99
parent11d39769de12b3409fc3fcfac96bef1bb20cef2f (diff)
improve build_ninja
-rw-r--r--CHANGELOG.md10
-rw-r--r--xmake/modules/core/tools/rc.lua1
-rw-r--r--xmake/plugins/project/ninja/build_ninja.lua6
3 files changed, 17 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ebe785160..c10441fa6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,11 @@
### Change
* [#589](https://github.com/xmake-io/xmake/issues/589): Improve and optimize build speed, supports parallel compilation and linking across targets
+* Improve the ninja/cmake generator
+
+### Bugs fixed
+
+* Fix the link errors output issues for msvc
## v2.3.1
@@ -700,6 +705,11 @@
### 改进
* [#589](https://github.com/xmake-io/xmake/issues/589): 改进优化构建速度,支持跨目标间并行编译和link,编译速度和ninja基本持平
+* 改进ninja/cmake工程文件生成器插件
+
+### Bugs修复
+
+* 修复windows下link error显示问题
## v2.3.1
diff --git a/xmake/modules/core/tools/rc.lua b/xmake/modules/core/tools/rc.lua
index e58aef2f6..13c31bb50 100644
--- a/xmake/modules/core/tools/rc.lua
+++ b/xmake/modules/core/tools/rc.lua
@@ -25,6 +25,7 @@ import("private.tools.vstool")
-- init it
function init(self)
+ self:set("mrcflags", "-nologo")
end
-- make the define flag
diff --git a/xmake/plugins/project/ninja/build_ninja.lua b/xmake/plugins/project/ninja/build_ninja.lua
index 407fc9184..7890e2790 100644
--- a/xmake/plugins/project/ninja/build_ninja.lua
+++ b/xmake/plugins/project/ninja/build_ninja.lua
@@ -225,6 +225,12 @@ function _add_build_for_target(ninjafile, target)
for _, objectfile in ipairs(objectfiles) do
ninjafile:write(" " .. objectfile)
end
+ -- merge objects with rule("utils.merge.object")
+ for _, sourcebatch in pairs(target:sourcebatches()) do
+ if sourcebatch.rulename == "utils.merge.object" then
+ ninjafile:write(" " .. table.concat(sourcebatch.sourcefiles, " "))
+ end
+ end
local deps = target:get("deps")
if deps then
ninjafile:print(" || $")