diff options
| author | ruki <[email protected]> | 2018-11-13 22:48:36 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-11-13 10:51:40 +0800 |
| commit | 7d234801498d6e272d780407695ebff89a64d675 (patch) | |
| tree | 28313737e1c44c3d639fbf49ab05ed0bc68ec1d4 /xmake/modules/core/tools/rustc.lua | |
| parent | bcfe7b269dc8ccca180099c8ce62f333a405ed11 (diff) | |
improve compiler tools
Diffstat (limited to 'xmake/modules/core/tools/rustc.lua')
| -rw-r--r-- | xmake/modules/core/tools/rustc.lua | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/xmake/modules/core/tools/rustc.lua b/xmake/modules/core/tools/rustc.lua index 8df967401..f4ef43b0b 100644 --- a/xmake/modules/core/tools/rustc.lua +++ b/xmake/modules/core/tools/rustc.lua @@ -31,30 +31,25 @@ import("core.project.project") function init(self) -- init arflags - _g.arflags = { "--crate-type=lib" } + self:set("arflags", "--crate-type=lib") -- init shflags - _g.shflags = { "--crate-type=dylib" } + self:set("shflags", "--crate-type=dylib") -- init ldflags - _g.ldflags = { "--crate-type=bin" } + self:set("ldflags", "--crate-type=bin") -- init the file formats - _g.formats = { static = "lib$(name).rlib" } + self:set("formats", { static = "lib$(name).rlib" }) -- init buildmodes - _g.buildmodes = + self:set("buildmodes", { ["object:sources"] = false -- compile multiple source filess to the single object , ["binary:sources"] = true -- build multiple source files to the binary target file , ["static:sources"] = true -- build multiple source files to the static target file , ["shared:sources"] = true -- build multiple source files to the shared target file - } -end - --- get the property -function get(self, name) - return _g[name] + }) end -- make the optimize flag |
