diff options
| author | ruki <[email protected]> | 2017-07-14 22:05:03 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-07-14 22:05:03 +0800 |
| commit | c3576499ce8251ce6bf8610eb7b2b67d3e34a61b (patch) | |
| tree | d8a7167d73d2e6f39c0446d6d02652e0e1ac21f3 | |
| parent | ff2e7977ac754b4c3a996b5558d8c5068d7c4bf5 (diff) | |
rename feature to buildmode
| -rw-r--r-- | xmake/actions/build/kinds/binary.lua | 2 | ||||
| -rw-r--r-- | xmake/actions/build/kinds/shared.lua | 2 | ||||
| -rw-r--r-- | xmake/actions/build/kinds/static.lua | 2 | ||||
| -rw-r--r-- | xmake/core/project/target.lua | 2 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/import/core/tool/compiler.lua | 8 | ||||
| -rw-r--r-- | xmake/core/tool/builder.lua | 10 | ||||
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/core/tools/dmd.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/core/tools/go.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/core/tools/ml.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/core/tools/rc.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/core/tools/rustc.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/core/tools/swiftc.lua | 4 |
14 files changed, 29 insertions, 29 deletions
diff --git a/xmake/actions/build/kinds/binary.lua b/xmake/actions/build/kinds/binary.lua index 78ca5996d..fb69ac246 100644 --- a/xmake/actions/build/kinds/binary.lua +++ b/xmake/actions/build/kinds/binary.lua @@ -127,7 +127,7 @@ function build(target, buildinfo) end -- build target - if kindcount == 1 and sourcekind and compiler.feature(sourcekind, "binary:sources") then + if kindcount == 1 and sourcekind and compiler.buildmode(sourcekind, "binary:sources") then _build_from_sources(target, buildinfo, sourcebatch, sourcekind) else _build_from_objects(target, buildinfo) diff --git a/xmake/actions/build/kinds/shared.lua b/xmake/actions/build/kinds/shared.lua index 3cbcea9c8..d7b6b95dd 100644 --- a/xmake/actions/build/kinds/shared.lua +++ b/xmake/actions/build/kinds/shared.lua @@ -140,7 +140,7 @@ function build(target, buildinfo) end -- build target - if kindcount == 1 and sourcekind and compiler.feature(sourcekind, "shared:sources") then + if kindcount == 1 and sourcekind and compiler.buildmode(sourcekind, "shared:sources") then _build_from_sources(target, buildinfo, sourcebatch, sourcekind) else _build_from_objects(target, buildinfo) diff --git a/xmake/actions/build/kinds/static.lua b/xmake/actions/build/kinds/static.lua index 9682c3846..2f344d3c9 100644 --- a/xmake/actions/build/kinds/static.lua +++ b/xmake/actions/build/kinds/static.lua @@ -140,7 +140,7 @@ function build(target, buildinfo) end -- build target - if kindcount == 1 and sourcekind and compiler.feature(sourcekind, "static:sources") then + if kindcount == 1 and sourcekind and compiler.buildmode(sourcekind, "static:sources") then _build_from_sources(target, buildinfo, sourcebatch, sourcekind) else _build_from_objects(target, buildinfo) diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 6ca800f7f..af013c46f 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -615,7 +615,7 @@ function target:sourcebatches() -- this batch support to compile multiple objects at the same time? local instance = compiler.load(sourcekind) - if instance and instance:feature("object:sources") then + if instance and instance:buildmode("object:sources") then -- get the first source file local sourcefile = sourcebatch.sourcefiles[1] diff --git a/xmake/core/sandbox/modules/import/core/tool/compiler.lua b/xmake/core/sandbox/modules/import/core/tool/compiler.lua index 712ae3852..c12ff52e4 100644 --- a/xmake/core/sandbox/modules/import/core/tool/compiler.lua +++ b/xmake/core/sandbox/modules/import/core/tool/compiler.lua @@ -34,8 +34,8 @@ local assert = require("sandbox/modules/assert") local import = require("sandbox/modules/import") local sandbox = require("sandbox/sandbox") --- get the feature of compiler -function sandbox_core_tool_compiler.feature(sourcekind, name) +-- get the build mode of compiler +function sandbox_core_tool_compiler.buildmode(sourcekind, name) -- get the compiler instance local instance, errors = compiler.load(sourcekind) @@ -43,8 +43,8 @@ function sandbox_core_tool_compiler.feature(sourcekind, name) raise(errors) end - -- get feature - return instance:feature(name) + -- get build mode + return instance:buildmode(name) end -- make command for compiling source file diff --git a/xmake/core/tool/builder.lua b/xmake/core/tool/builder.lua index e855dcfea..5e01233db 100644 --- a/xmake/core/tool/builder.lua +++ b/xmake/core/tool/builder.lua @@ -310,13 +310,13 @@ function builder:format(targetkind) end end --- get feature of the tool -function builder:feature(name) +-- get buildmode of the tool +function builder:buildmode(name) -- get it - local features = self:get("features") - if features then - return features[name] + local buildmodes = self:get("buildmodes") + if buildmodes then + return buildmodes[name] end end diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 45b49e85c..81146817e 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -78,8 +78,8 @@ function init(self) , ["-fsanitize=address"] = "" } - -- init features - _g.features = + -- init buildmodes + _g.buildmodes = { ["object:sources"] = false } diff --git a/xmake/modules/core/tools/dmd.lua b/xmake/modules/core/tools/dmd.lua index ed30223cc..d7353c60e 100644 --- a/xmake/modules/core/tools/dmd.lua +++ b/xmake/modules/core/tools/dmd.lua @@ -40,8 +40,8 @@ function init(self) _g.shared = {} _g.shared.dcflags = {"-fPIC"} - -- init features - _g.features = + -- init buildmodes + _g.buildmodes = { ["object:sources"] = false } diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index ef91c81e6..0c0d27ac5 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -66,8 +66,8 @@ function init(self) , ["-S"] = "-S" } - -- init features - _g.features = + -- init buildmodes + _g.buildmodes = { ["object:sources"] = false } diff --git a/xmake/modules/core/tools/go.lua b/xmake/modules/core/tools/go.lua index 47630f291..521e13fde 100644 --- a/xmake/modules/core/tools/go.lua +++ b/xmake/modules/core/tools/go.lua @@ -37,8 +37,8 @@ function init(self) _g.formats = {} _g.formats.static = {"", ".a"} - -- init features - _g.features = + -- init buildmodes + _g.buildmodes = { ["object:sources"] = true } diff --git a/xmake/modules/core/tools/ml.lua b/xmake/modules/core/tools/ml.lua index 207580dbc..6bc3ec4d1 100644 --- a/xmake/modules/core/tools/ml.lua +++ b/xmake/modules/core/tools/ml.lua @@ -52,8 +52,8 @@ function init(self) , ["-fsanitize=address"] = "" } - -- init features - _g.features = + -- init buildmodes + _g.buildmodes = { ["object:sources"] = false } diff --git a/xmake/modules/core/tools/rc.lua b/xmake/modules/core/tools/rc.lua index 4f39181bf..f6feecb56 100644 --- a/xmake/modules/core/tools/rc.lua +++ b/xmake/modules/core/tools/rc.lua @@ -29,8 +29,8 @@ import("core.project.project") -- init it function init(self) - -- init features - _g.features = + -- init buildmodes + _g.buildmodes = { ["object:sources"] = false } diff --git a/xmake/modules/core/tools/rustc.lua b/xmake/modules/core/tools/rustc.lua index 6e102f69d..4ef749b07 100644 --- a/xmake/modules/core/tools/rustc.lua +++ b/xmake/modules/core/tools/rustc.lua @@ -43,8 +43,8 @@ function init(self) _g.formats = {} _g.formats.static = {"lib", ".rlib"} - -- init features - _g.features = + -- init buildmodes + _g.buildmodes = { ["object:sources"] = false -- compile multiple source filess to the single object , ["binary:sources"] = true -- build multiple source files to the binary target file diff --git a/xmake/modules/core/tools/swiftc.lua b/xmake/modules/core/tools/swiftc.lua index 4ce63567c..714d2b1b1 100644 --- a/xmake/modules/core/tools/swiftc.lua +++ b/xmake/modules/core/tools/swiftc.lua @@ -56,8 +56,8 @@ function init(self) , ["-fsanitize=address"] = "" } - -- init features - _g.features = + -- init buildmodes + _g.buildmodes = { ["object:sources"] = false } |
