From 239bed9e275931c7adcf620a27360078b4261d3c Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 2 Aug 2017 22:00:11 +0800 Subject: fix compile and link error tips --- xmake/actions/build/kinds/binary.lua | 2 +- xmake/actions/build/kinds/object.lua | 2 +- xmake/actions/build/kinds/shared.lua | 2 +- xmake/actions/build/kinds/static.lua | 2 +- 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)}) -- cgit v1.3.1