summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2017-08-02 22:00:11 +0800
committerruki <[email protected]>2017-08-02 22:00:11 +0800
commit239bed9e275931c7adcf620a27360078b4261d3c (patch)
tree65d1b4d200cda515bebf45e0cf05cb86cfa5d864
parentac57c89fa7eaee01b8b92d0c6020ba8ff789458b (diff)
fix compile and link error tips
-rw-r--r--xmake/actions/build/kinds/binary.lua2
-rw-r--r--xmake/actions/build/kinds/object.lua2
-rw-r--r--xmake/actions/build/kinds/shared.lua2
-rw-r--r--xmake/actions/build/kinds/static.lua2
4 files changed, 4 insertions, 4 deletions
diff --git a/xmake/actions/build/kinds/binary.lua b/xmake/actions/build/kinds/binary.lua
index 0ad520585..ccfd39c44 100644
--- a/xmake/actions/build/kinds/binary.lua
+++ b/xmake/actions/build/kinds/binary.lua
@@ -108,7 +108,7 @@ function _build_from_objects(target, buildinfo)
end
-- link it
- linker_instance:link(objectfiles, targetfile, {target = target})
+ assert(linker_instance:link(objectfiles, targetfile, {target = target}))
-- save program and flags to the dependent file
io.save(depfile, {program = linker_instance:program(), flags = linker_instance:linkflags({target = target})})
diff --git a/xmake/actions/build/kinds/object.lua b/xmake/actions/build/kinds/object.lua
index bad46ae01..9cee1afba 100644
--- a/xmake/actions/build/kinds/object.lua
+++ b/xmake/actions/build/kinds/object.lua
@@ -178,7 +178,7 @@ function _build_object(target, buildinfo, index, sourcebatch, ccache)
end
-- complie it
- compiler_instance:compile(sourcefile, objectfile, {depinfo = depinfo, target = target})
+ assert(compiler_instance:compile(sourcefile, objectfile, {depinfo = depinfo, target = target}))
-- save sources to the dependent info
depinfo.sources = {sourcefile, target:pcsourcefile()}
diff --git a/xmake/actions/build/kinds/shared.lua b/xmake/actions/build/kinds/shared.lua
index 6c9860aa1..ac1a4c456 100644
--- a/xmake/actions/build/kinds/shared.lua
+++ b/xmake/actions/build/kinds/shared.lua
@@ -113,7 +113,7 @@ function _build_from_objects(target, buildinfo)
end
-- link it
- linker.link(target:get("kind"), target:sourcekinds(), objectfiles, targetfile, {target = target})
+ assert(linker.link(target:get("kind"), target:sourcekinds(), objectfiles, targetfile, {target = target}))
-- save command to the dependent file
io.save(depfile, {command = target:linkcmd(objectfiles)})
diff --git a/xmake/actions/build/kinds/static.lua b/xmake/actions/build/kinds/static.lua
index 20e3d27e2..6f2e1881e 100644
--- a/xmake/actions/build/kinds/static.lua
+++ b/xmake/actions/build/kinds/static.lua
@@ -113,7 +113,7 @@ function _build_from_objects(target, buildinfo)
end
-- link it
- linker.link(target:get("kind"), target:sourcekinds(), objectfiles, targetfile, {target = target})
+ assert(linker.link(target:get("kind"), target:sourcekinds(), objectfiles, targetfile, {target = target}))
-- save command to the dependent file
io.save(depfile, {command = target:linkcmd(objectfiles)})