diff options
| author | ruki <[email protected]> | 2017-08-01 11:52:55 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-08-01 11:52:55 +0800 |
| commit | c87c400fcbb581c1590694bf6ee05d73d5d3e984 (patch) | |
| tree | 613f69068bd9015aecc891b5b67df7992b7e5e54 | |
| parent | fa9702bfcf4ba7ed2b599727913444cc3498bfda (diff) | |
improve dep compile and link
| -rw-r--r-- | xmake/actions/build/kinds/binary.lua | 42 | ||||
| -rw-r--r-- | xmake/actions/build/kinds/object.lua | 112 | ||||
| -rw-r--r-- | xmake/actions/build/kinds/shared.lua | 42 | ||||
| -rw-r--r-- | xmake/actions/build/kinds/static.lua | 42 | ||||
| -rw-r--r-- | xmake/actions/build/main.lua | 22 | ||||
| -rw-r--r-- | xmake/actions/clean/main.lua | 3 | ||||
| -rw-r--r-- | xmake/actions/config/configheader.lua | 1 | ||||
| -rw-r--r-- | xmake/actions/config/main.lua | 3 | ||||
| -rw-r--r-- | xmake/core/base/os.lua | 12 | ||||
| -rw-r--r-- | xmake/core/project/target.lua | 15 | ||||
| -rw-r--r-- | xmake/core/tool/compiler.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 77 | ||||
| -rw-r--r-- | xmake/modules/core/tools/dmd.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 16 | ||||
| -rw-r--r-- | xmake/modules/core/tools/go.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/core/tools/ml.lua | 6 | ||||
| -rw-r--r-- | xmake/modules/core/tools/rc.lua | 6 | ||||
| -rw-r--r-- | xmake/modules/core/tools/rustc.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/core/tools/swiftc.lua | 6 |
19 files changed, 240 insertions, 173 deletions
diff --git a/xmake/actions/build/kinds/binary.lua b/xmake/actions/build/kinds/binary.lua index 5f4a31736..31db2faed 100644 --- a/xmake/actions/build/kinds/binary.lua +++ b/xmake/actions/build/kinds/binary.lua @@ -28,6 +28,32 @@ import("core.tool.linker") import("core.tool.compiler") import("object") +-- is modified? +function _is_modified(target, depfile, buildinfo) + + -- this target and it's deps are not modified? + local modified = buildinfo.rebuild or buildinfo.modified[target:name()] + if modified then + return true + end + + -- deps modified? + for _, depname in ipairs(target:get("deps")) do + if buildinfo.modified[depname] then + return true + end + end + + -- get dependent info + local depinfo = {} + if os.isfile(depfile) then + depinfo = io.load(depfile) or {} + end + + -- the command has been modified? + return target:linkcmd(objectfiles) ~= depinfo.command +end + -- build target from sources function _build_from_objects(target, buildinfo) @@ -35,17 +61,10 @@ function _build_from_objects(target, buildinfo) object.build(target, buildinfo) -- this target and it's deps are not modified? - local modified = buildinfo.rebuild or buildinfo.modified[target:name()] + local depfile = target:depfile() + local modified = _is_modified(target, depfile, buildinfo) if not modified then - for _, depname in ipairs(target:get("deps")) do - modified = buildinfo.modified[depname] - if modified then - break - end - end - if not modified then - return - end + return end -- expand object files with *.o/obj @@ -82,6 +101,9 @@ function _build_from_objects(target, buildinfo) -- link it linker.link(target:get("kind"), target:sourcekinds(), objectfiles, targetfile, {target = target}) + + -- save command to the dependent file + io.save(depfile, {command = target:linkcmd(objectfiles)}) end -- build target from sources diff --git a/xmake/actions/build/kinds/object.lua b/xmake/actions/build/kinds/object.lua index 2b801aeb0..53df96bdd 100644 --- a/xmake/actions/build/kinds/object.lua +++ b/xmake/actions/build/kinds/object.lua @@ -30,6 +30,51 @@ import("core.project.config") import("core.language.language") import("detect.tools.find_ccache") +-- is modified? +function _is_modified(target, sourcefile, objectfile, depinfo, sourcekind, buildinfo) + + -- rebuild? + if buildinfo.rebuild then + return true + end + + -- get the dependent files + local depfiles = table.join(depinfo.sources or {}, depinfo.includes or {}) + + -- check the dependent files are modified? + local modified = false + local objectmtime = nil + _g.depfile_results = _g.depfile_results or {} + for _, depfile in ipairs(depfiles) do + + -- optimization: this depfile has been not checked? + local status = _g.depfile_results[depfile] + if status == nil then + + -- optimization: only uses the mtime of first object file + objectmtime = objectmtime or os.mtime(objectfile) + + -- source and header files have been modified? + if os.mtime(depfile) > objectmtime then + + -- mark this depfile as modified + _g.depfile_results[depfile] = true + return true + end + + -- mark this depfile as not modified + _g.depfile_results[depfile] = false + + -- has been checked and modified? + elseif status then + return true + end + end + + -- the command has been modified? + return compiler.compcmd(sourcefile, objectfile, {target = target, sourcekind = sourcekind}) ~= depinfo.command +end + -- build the object from the *.[o|obj] source file function _build_from_object(target, sourcefile, objectfile, percent) @@ -94,54 +139,15 @@ function _build_object(target, buildinfo, index, sourcebatch, ccache) return _build_from_static(target, sourcefile, objectfile, percent) end - -- get dependent files - local depfiles = {} - if incdepfile and os.isfile(incdepfile) then - depfiles = io.load(incdepfile) + -- get dependent info + local depinfo = {} + if not buildinfo.rebuild and os.isfile(incdepfile) then + depinfo = io.load(incdepfile) or {} end - table.insert(depfiles, sourcefile) - - -- add precompiled header to the dependent files - table.join2(depfiles, target:pcsourcefile()) - -- check the dependent files are modified? - local modified = false - local objectmtime = nil - _g.depfile_results = _g.depfile_results or {} - for _, depfile in ipairs(depfiles) do - - -- optimization: this depfile has been not checked? - local status = _g.depfile_results[depfile] - if status == nil then - - -- optimization: only uses the mtime of first object file - objectmtime = objectmtime or os.mtime(objectfile) - - -- source and header files have been modified? - if os.mtime(depfile) > objectmtime then - - -- modified - modified = true - - -- mark this depfile as modified - _g.depfile_results[depfile] = true - break - end - - -- mark this depfile as not modified - _g.depfile_results[depfile] = false - - -- has been checked and modified? - elseif status then - - -- modified - modified = true - break - end - end - - -- we need not rebuild it if the files are not modified - if not modified and not buildinfo.rebuild then + -- is modified? + local modified = _is_modified(target, sourcefile, objectfile, depinfo, sourcekind, buildinfo) + if not modified then return end @@ -159,12 +165,22 @@ function _build_object(target, buildinfo, index, sourcebatch, ccache) end -- trace verbose info + local command = compiler.compcmd(sourcefile, objectfile, {target = target, sourcekind = sourcekind}) if verbose then - print(compiler.compcmd(sourcefile, objectfile, {target = target, sourcekind = sourcekind})) + print(command) end -- complie it - compiler.compile(sourcefile, objectfile, {incdepfiles = incdepfile, target = target, sourcekind = sourcekind}) + compiler.compile(sourcefile, objectfile, {depinfo = depinfo, target = target, sourcekind = sourcekind}) + + -- save sources to the dependent info + depinfo.sources = {sourcefile, target:pcsourcefile()} + + -- save command to the dependent info + depinfo.command = command + + -- save the dependent info + io.save(incdepfile, depinfo) end -- build each objects from the given source batch diff --git a/xmake/actions/build/kinds/shared.lua b/xmake/actions/build/kinds/shared.lua index 0b47b4684..6c9860aa1 100644 --- a/xmake/actions/build/kinds/shared.lua +++ b/xmake/actions/build/kinds/shared.lua @@ -28,6 +28,32 @@ import("core.tool.linker") import("core.tool.compiler") import("object") +-- is modified? +function _is_modified(target, depfile, buildinfo) + + -- this target and it's deps are not modified? + local modified = buildinfo.rebuild or buildinfo.modified[target:name()] + if modified then + return true + end + + -- deps modified? + for _, depname in ipairs(target:get("deps")) do + if buildinfo.modified[depname] then + return true + end + end + + -- get dependent info + local depinfo = {} + if os.isfile(depfile) then + depinfo = io.load(depfile) or {} + end + + -- the command has been modified? + return target:linkcmd(objectfiles) ~= depinfo.command +end + -- build target from objects function _build_from_objects(target, buildinfo) @@ -35,17 +61,10 @@ function _build_from_objects(target, buildinfo) object.build(target, buildinfo) -- this target and it's deps are not modified? - local modified = buildinfo.rebuild or buildinfo.modified[target:name()] + local depfile = target:depfile() + local modified = _is_modified(target, depfile, buildinfo) if not modified then - for _, depname in ipairs(target:get("deps")) do - modified = buildinfo.modified[depname] - if modified then - break - end - end - if not modified then - return - end + return end -- make headers @@ -95,6 +114,9 @@ function _build_from_objects(target, buildinfo) -- link it linker.link(target:get("kind"), target:sourcekinds(), objectfiles, targetfile, {target = target}) + + -- save command to the dependent file + io.save(depfile, {command = target:linkcmd(objectfiles)}) end -- build target from sources diff --git a/xmake/actions/build/kinds/static.lua b/xmake/actions/build/kinds/static.lua index c767908fe..20e3d27e2 100644 --- a/xmake/actions/build/kinds/static.lua +++ b/xmake/actions/build/kinds/static.lua @@ -28,6 +28,32 @@ import("core.tool.linker") import("core.tool.compiler") import("object") +-- is modified? +function _is_modified(target, depfile, buildinfo) + + -- this target and it's deps are not modified? + local modified = buildinfo.rebuild or buildinfo.modified[target:name()] + if modified then + return true + end + + -- deps modified? + for _, depname in ipairs(target:get("deps")) do + if buildinfo.modified[depname] then + return true + end + end + + -- get dependent info + local depinfo = {} + if os.isfile(depfile) then + depinfo = io.load(depfile) or {} + end + + -- the command has been modified? + return target:linkcmd(objectfiles) ~= depinfo.command +end + -- build target from objects function _build_from_objects(target, buildinfo) @@ -35,17 +61,10 @@ function _build_from_objects(target, buildinfo) object.build(target, buildinfo) -- this target and it's deps are not modified? - local modified = buildinfo.rebuild or buildinfo.modified[target:name()] + local depfile = target:depfile() + local modified = _is_modified(target, depfile, buildinfo) if not modified then - for _, depname in ipairs(target:get("deps")) do - modified = buildinfo.modified[depname] - if modified then - break - end - end - if not modified then - return - end + return end -- make headers @@ -95,6 +114,9 @@ function _build_from_objects(target, buildinfo) -- link it linker.link(target:get("kind"), target:sourcekinds(), objectfiles, targetfile, {target = target}) + + -- save command to the dependent file + io.save(depfile, {command = target:linkcmd(objectfiles)}) end -- build target from sources diff --git a/xmake/actions/build/main.lua b/xmake/actions/build/main.lua index 22d8bc4dd..1578b9e8d 100644 --- a/xmake/actions/build/main.lua +++ b/xmake/actions/build/main.lua @@ -27,7 +27,6 @@ import("core.base.option") import("core.base.task") import("core.project.config") import("core.project.project") -import("core.project.cache", {nocache = true}) import("core.platform.platform") import("builder") @@ -40,23 +39,6 @@ function main() -- config it first task.run("config", {target = targetname}) - -- enter cache scope - cache.enter("local.config") - - -- rebuild? - local rebuild = false - if option.get("rebuild") or cache.get("rebuild") then - - -- mark as rebuild - rebuild = true - - -- reset state - cache.set("rebuild", nil) - end - - -- flush cache to file - cache.flush() - -- enter project directory local oldir = os.cd(project.directory()) @@ -64,9 +46,7 @@ function main() try { function () - - -- build - builder.build(targetname, rebuild) + builder.build(targetname, option.get("rebuild")) end, catch diff --git a/xmake/actions/clean/main.lua b/xmake/actions/clean/main.lua index 4fed90d02..50dec8ad1 100644 --- a/xmake/actions/clean/main.lua +++ b/xmake/actions/clean/main.lua @@ -62,6 +62,9 @@ function _on_clean_target(target) -- remove the target arguments file if exists _remove(target:targetfile() .. ".arg") + -- remove the target dependent file if exists + _remove(target:depfile()) + -- remove the symbol file _remove(target:symbolfile()) diff --git a/xmake/actions/config/configheader.lua b/xmake/actions/config/configheader.lua index 3187b6c83..c16f1b429 100644 --- a/xmake/actions/config/configheader.lua +++ b/xmake/actions/config/configheader.lua @@ -107,7 +107,6 @@ function _make_for_target(files, target) -- cache the file files[configheader] = file - end -- make the configure file for the given target and dependents diff --git a/xmake/actions/config/main.lua b/xmake/actions/config/main.lua index bc7fa5fc2..db530e730 100644 --- a/xmake/actions/config/main.lua +++ b/xmake/actions/config/main.lua @@ -244,9 +244,6 @@ function main() -- check project options project.check() - -- rebuild it - cache.set("rebuild", true) - -- clear detect cache detectcache.clear() end diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index 557b3d7a7..798feb4e2 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -159,15 +159,6 @@ end -- make string from arguments list function os.args(argv) - -- init key - local key = tostring(argv) - - -- init cache - os._ARGS = os._ARGS or {} - if os._ARGS[key] then - return os._ARGS[key] - end - -- make it local args = nil for _, arg in ipairs(argv) do @@ -190,9 +181,6 @@ function os.args(argv) end end - -- cache it - os._ARGS[key] = args or "" - -- ok? return args or "" end diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 7999ee2de..d6d2ee0a8 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -214,6 +214,21 @@ function target:objectdir() return objectdir end +-- get the target dependent file +function target:depfile() + + -- the target directory + local targetdir = self:get("targetdir") or config.get("buildir") + assert(targetdir and type(targetdir) == "string") + + -- the symbol file name + local filename = (self:basename() or self:name()) .. ".d" + assert(filename) + + -- make the dependent file path + return path.join(targetdir, filename) +end + -- get the target kind function target:targetkind() return self:get("kind") diff --git a/xmake/core/tool/compiler.lua b/xmake/core/tool/compiler.lua index 3be1f9749..612018ee3 100644 --- a/xmake/core/tool/compiler.lua +++ b/xmake/core/tool/compiler.lua @@ -180,7 +180,7 @@ function compiler:compile(sourcefiles, objectfile, opt) opt = opt or {} -- compile it - return sandbox.load(self:_tool().compile, self:_tool(), sourcefiles, objectfile, opt.incdepfiles, self:compflags(opt)) + return sandbox.load(self:_tool().compile, self:_tool(), sourcefiles, objectfile, opt.depinfo, self:compflags(opt)) end -- get the compile arguments list diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index e9a3682bf..39d14e350 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -240,6 +240,33 @@ function nf_precompiled_header(self, headerfile, target) end end +-- get include deps +function _include_deps(self, outdata) + + -- translate it + local results = {} + local uniques = {} + for includefile in string.gmatch(outdata, ".-: .-:%s*(.-)\r*\n") do + + -- slower, only for debuging + -- assert(os.isfile(includefile), "invalid include file: %s for %s", includefile, depinfo) + + -- get the relative + includefile = path.relative(includefile, project.directory()) + + -- save it if belong to the project + if not path.is_absolute(includefile) then + + -- insert it and filter repeat + if not uniques[includefile] then + table.insert(results, includefile) + uniques[includefile] = true + end + end + end + return results +end + -- make the complie arguments list for the precompiled header function _compargv1_pch(self, headerfile, objectfile, flags) @@ -288,22 +315,22 @@ function _compargv1(self, sourcefile, objectfile, flags) end -- complie the source file -function _compile1(self, sourcefile, objectfile, incdepfile, flags) +function _compile1(self, sourcefile, objectfile, depinfo, flags) -- ensure the object directory os.mkdir(path.directory(objectfile)) - -- generate includes file - if incdepfile then - flags = flags or {} - table.insert(flags, "-showIncludes") - end - -- compile it local outdata = try { function () - return os.iorunv(_compargv1(self, sourcefile, objectfile, flags)) + + -- generate includes file + local compflags = flags + if depinfo then + compflags = table.join(flags, "-showIncludes") + end + return os.iorunv(_compargv1(self, sourcefile, objectfile, compflags)) end, catch @@ -325,33 +352,9 @@ function _compile1(self, sourcefile, objectfile, incdepfile, flags) } } - -- parse include dependencies - if incdepfile and outdata then - - -- translate it - local results = {} - local uniques = {} - for includefile in string.gmatch(outdata, ".-: .-:%s*(.-)\r*\n") do - - -- slower, only for debuging --- assert(os.isfile(includefile), "invalid include file: %s for %s", includefile, incdepfile) - - -- get the relative - includefile = path.relative(includefile, project.directory()) - - -- save it if belong to the project - if not path.is_absolute(includefile) then - - -- insert it and filter repeat - if not uniques[includefile] then - table.insert(results, includefile) - uniques[includefile] = true - end - end - end - - -- update it - io.save(incdepfile, results) + -- generate the dependent includes + if depinfo and outdata then + depinfo.includes = _include_deps(self, outdata) end end @@ -366,13 +369,13 @@ function compargv(self, sourcefiles, objectfile, flags) end -- complie the source file -function compile(self, sourcefiles, objectfile, incdepfile, flags) +function compile(self, sourcefiles, objectfile, depinfo, flags) -- only support single source file now assert(type(sourcefiles) ~= "table", "'object:sources' not support!") -- for only single source file - _compile1(self, sourcefiles, objectfile, incdepfile, flags) + _compile1(self, sourcefiles, objectfile, depinfo, flags) end diff --git a/xmake/modules/core/tools/dmd.lua b/xmake/modules/core/tools/dmd.lua index d7353c60e..ec76f8eab 100644 --- a/xmake/modules/core/tools/dmd.lua +++ b/xmake/modules/core/tools/dmd.lua @@ -171,7 +171,7 @@ function compargv(self, sourcefiles, objectfile, flags) end -- complie the source file -function compile(self, sourcefiles, objectfile, incdepfile, flags) +function compile(self, sourcefiles, objectfile, depinfo, flags) -- ensure the object directory os.mkdir(path.directory(objectfile)) diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 20192cf85..7fbe4aa3e 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -297,8 +297,8 @@ function _include_deps(self, sourcefile, flags) -- translate it results = {} - local incdeps = io.readfile(tmpfile) - for includefile in string.gmatch(incdeps, "%s+([%w/%.%-%+_%$%.]+)") do + local deps = io.readfile(tmpfile) + for includefile in string.gmatch(deps, "%s+([%w/%.%-%+_%$%.]+)") do -- save it if belong to the project if not path.is_absolute(includefile) then @@ -381,7 +381,7 @@ function _compargv1(self, sourcefile, objectfile, flags) end -- complie the source file -function _compile1(self, sourcefile, objectfile, incdepfile, flags) +function _compile1(self, sourcefile, objectfile, depinfo, flags) -- ensure the object directory os.mkdir(path.directory(objectfile)) @@ -416,9 +416,9 @@ function _compile1(self, sourcefile, objectfile, incdepfile, flags) } } - -- generate includes file - if incdepfile and self:kind() ~= "as" then - io.save(incdepfile, _include_deps(self, sourcefile, flags)) + -- generate the dependent includes + if depinfo and self:kind() ~= "as" then + depinfo.includes = _include_deps(self, sourcefile, flags) end end @@ -433,12 +433,12 @@ function compargv(self, sourcefiles, objectfile, flags) end -- complie the source file -function compile(self, sourcefiles, objectfile, incdepfile, flags) +function compile(self, sourcefiles, objectfile, depinfo, flags) -- only support single source file now assert(type(sourcefiles) ~= "table", "'object:sources' not support!") -- for only single source file - _compile1(self, sourcefiles, objectfile, incdepfile, flags) + _compile1(self, sourcefiles, objectfile, depinfo, flags) end diff --git a/xmake/modules/core/tools/go.lua b/xmake/modules/core/tools/go.lua index 521e13fde..c56f0f9c1 100644 --- a/xmake/modules/core/tools/go.lua +++ b/xmake/modules/core/tools/go.lua @@ -131,7 +131,7 @@ function compargv(self, sourcefiles, objectfile, flags) end -- complie the source file -function compile(self, sourcefiles, objectfile, incdepfile, flags) +function compile(self, sourcefiles, objectfile, depinfo, flags) -- ensure the object directory os.mkdir(path.directory(objectfile)) diff --git a/xmake/modules/core/tools/ml.lua b/xmake/modules/core/tools/ml.lua index 6bc3ec4d1..d25e1f239 100644 --- a/xmake/modules/core/tools/ml.lua +++ b/xmake/modules/core/tools/ml.lua @@ -102,7 +102,7 @@ function _compargv1(self, sourcefile, objectfile, flags) end -- complie the source file -function _compile1(self, sourcefile, objectfile, incdepfile, flags) +function _compile1(self, sourcefile, objectfile, depinfo, flags) -- ensure the object directory os.mkdir(path.directory(objectfile)) @@ -122,12 +122,12 @@ function compargv(self, sourcefiles, objectfile, flags) end -- complie the source file -function compile(self, sourcefiles, objectfile, incdepfile, flags) +function compile(self, sourcefiles, objectfile, depinfo, flags) -- only support single source file now assert(type(sourcefiles) ~= "table", "'object:sources' not support!") -- for only single source file - _compile1(self, sourcefiles, objectfile, incdepfile, flags) + _compile1(self, sourcefiles, objectfile, depinfo, flags) end diff --git a/xmake/modules/core/tools/rc.lua b/xmake/modules/core/tools/rc.lua index f6feecb56..5d02a4837 100644 --- a/xmake/modules/core/tools/rc.lua +++ b/xmake/modules/core/tools/rc.lua @@ -62,7 +62,7 @@ function _compargv1(self, sourcefile, objectfile, flags) end -- complie the source file -function _compile1(self, sourcefile, objectfile, incdepfile, flags) +function _compile1(self, sourcefile, objectfile, depinfo, flags) -- ensure the object directory os.mkdir(path.directory(objectfile)) @@ -106,13 +106,13 @@ function compargv(self, sourcefiles, objectfile, flags) end -- complie the source file -function compile(self, sourcefiles, objectfile, incdepfile, flags) +function compile(self, sourcefiles, objectfile, depinfo, flags) -- only support single source file now assert(type(sourcefiles) ~= "table", "'object:sources' not support!") -- for only single source file - _compile1(self, sourcefiles, objectfile, incdepfile, flags) + _compile1(self, sourcefiles, objectfile, depinfo, flags) end diff --git a/xmake/modules/core/tools/rustc.lua b/xmake/modules/core/tools/rustc.lua index 4ef749b07..1c8857502 100644 --- a/xmake/modules/core/tools/rustc.lua +++ b/xmake/modules/core/tools/rustc.lua @@ -115,7 +115,7 @@ function compargv(self, sourcefiles, objectfile, flags) end -- complie the source file -function compile(self, sourcefiles, objectfile, incdepfile, flags) +function compile(self, sourcefiles, objectfile, depinfo, flags) -- ensure the object directory os.mkdir(path.directory(objectfile)) diff --git a/xmake/modules/core/tools/swiftc.lua b/xmake/modules/core/tools/swiftc.lua index e233e1f9f..933131f9d 100644 --- a/xmake/modules/core/tools/swiftc.lua +++ b/xmake/modules/core/tools/swiftc.lua @@ -230,7 +230,7 @@ function _compargv1(self, sourcefile, objectfile, flags) end -- complie the source file -function _compile1(self, sourcefile, objectfile, incdepfile, flags) +function _compile1(self, sourcefile, objectfile, depinfo, flags) -- ensure the object directory os.mkdir(path.directory(objectfile)) @@ -250,12 +250,12 @@ function compargv(self, sourcefiles, objectfile, flags) end -- complie the source file -function compile(self, sourcefiles, objectfile, incdepfile, flags) +function compile(self, sourcefiles, objectfile, depinfo, flags) -- only support single source file now assert(type(sourcefiles) ~= "table", "'object:sources' not support!") -- for only single source file - _compile1(self, sourcefiles, objectfile, incdepfile, flags) + _compile1(self, sourcefiles, objectfile, depinfo, flags) end |
