diff options
| author | ruki <[email protected]> | 2019-03-04 23:52:18 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-03-04 17:13:53 +0800 |
| commit | f8753e436dc75203361a6a5256235f2796701e6f (patch) | |
| tree | 7ad78485ed4523135c6390ba0b8079b7a3c46bfc | |
| parent | 81222c3b9d2aec685ae0869adf58130d707af9b0 (diff) | |
modify changelog
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | xmake/core/platform/platform.lua | 9 | ||||
| -rw-r--r-- | xmake/core/tool/compiler.lua | 2 | ||||
| -rw-r--r-- | xmake/core/tool/linker.lua | 2 | ||||
| -rw-r--r-- | xmake/core/tool/tool.lua | 3 | ||||
| -rw-r--r-- | xmake/platforms/windows/config.lua | 2 | ||||
| -rw-r--r-- | xmake/plugins/project/vstudio/impl/vs201x.lua | 1 |
7 files changed, 14 insertions, 7 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 789649994..ec449b7fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ * Mark `set_modes()` as deprecated, we use `add_rules("mode.debug", "mode.release")` instead of it * [#353](https://github.com/xmake-io/xmake/issues/353) Improve `target:set`, `target:add` and add `target:del` to modify target configuration * [#356](https://github.com/xmake-io/xmake/issues/356) Add `qt_add_static_plugins()` api to support static Qt sdk +* [#351](https://github.com/xmake-io/xmake/issues/351) Support yasm for generating vs201x project ### Bugs fixed @@ -582,6 +583,7 @@ * 标记`set_modes()`作为废弃接口, 我们使用`add_rules("mode.debug", "mode.release")`来替代它 * [#353](https://github.com/xmake-io/xmake/issues/353) 改进`target:set`, `target:add` 并且添加`target:del`去动态修改target配置 * [#356](https://github.com/xmake-io/xmake/issues/356) 添加`qt_add_static_plugins()`接口去支持静态Qt sdk +* [#351](https://github.com/xmake-io/xmake/issues/351) 生成vs201x插件增加对yasm的支持 ### Bugs修复 diff --git a/xmake/core/platform/platform.lua b/xmake/core/platform/platform.lua index 6f866f8fd..e4fe05409 100644 --- a/xmake/core/platform/platform.lua +++ b/xmake/core/platform/platform.lua @@ -232,10 +232,13 @@ function platform.load(plat) return nil, string.format("unknown platform!") end + -- get cache key + local cachekey = plat .. "_" .. (config.get("arch") or os.arch()) + -- get it directly from cache dirst platform._PLATFORMS = platform._PLATFORMS or {} - if platform._PLATFORMS[plat] then - return platform._PLATFORMS[plat] + if platform._PLATFORMS[cachekey] then + return platform._PLATFORMS[cachekey] end -- find the platform script path @@ -291,7 +294,7 @@ function platform.load(plat) end -- save instance to the cache - platform._PLATFORMS[plat] = instance + platform._PLATFORMS[cachekey] = instance return instance end diff --git a/xmake/core/tool/compiler.lua b/xmake/core/tool/compiler.lua index 51ea1a312..3030946ad 100644 --- a/xmake/core/tool/compiler.lua +++ b/xmake/core/tool/compiler.lua @@ -105,7 +105,7 @@ function compiler.load(sourcekind, target) end -- init cache key - local cachekey = sourcekind .. (program_or_errors or "") + local cachekey = sourcekind .. (program_or_errors or "") .. (config.get("arch") or os.arch()) -- get it directly from cache dirst compiler._INSTANCES = compiler._INSTANCES or {} diff --git a/xmake/core/tool/linker.lua b/xmake/core/tool/linker.lua index ea653c1db..9b4ba4857 100644 --- a/xmake/core/tool/linker.lua +++ b/xmake/core/tool/linker.lua @@ -166,7 +166,7 @@ function linker.load(targetkind, sourcekinds, target) local linkerinfo = linkerinfo_or_errors -- init cache key - local cachekey = linkerinfo.linkerkind .. (linkerinfo.program or "") + local cachekey = linkerinfo.linkerkind .. (linkerinfo.program or "") .. (config.get("arch") or os.arch()) -- get it directly from cache dirst builder._INSTANCES = builder._INSTANCES or {} diff --git a/xmake/core/tool/tool.lua b/xmake/core/tool/tool.lua index 55bf350e4..92253c82a 100644 --- a/xmake/core/tool/tool.lua +++ b/xmake/core/tool/tool.lua @@ -32,6 +32,7 @@ local path = require("base/path") local utils = require("base/utils") local table = require("base/table") local string = require("base/string") +local config = require("project/config") local sandbox = require("sandbox/sandbox") local platform = require("platform/platform") local import = require("sandbox/modules/import") @@ -132,7 +133,7 @@ end function tool.load(kind, program) -- init key - local key = kind .. (program or "") + local key = kind .. (program or "") .. (config.get("arch") or os.arch()) -- get it directly from cache dirst tool._TOOLS = tool._TOOLS or {} diff --git a/xmake/platforms/windows/config.lua b/xmake/platforms/windows/config.lua index e6987f913..fba67a101 100644 --- a/xmake/platforms/windows/config.lua +++ b/xmake/platforms/windows/config.lua @@ -125,7 +125,7 @@ function main(platform, name) -- only check the given config name? if name then - local toolchain = singleton.get("windows.toolchains", _toolchains)[name] + local toolchain = singleton.get("windows.toolchains." .. (config.get("arch") or os.arch()), _toolchains)[name] if toolchain then environment.enter("toolchains") check_toolchain(config, name, toolchain) diff --git a/xmake/plugins/project/vstudio/impl/vs201x.lua b/xmake/plugins/project/vstudio/impl/vs201x.lua index f4337392b..e8e9dc4a2 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x.lua @@ -224,6 +224,7 @@ function make(outputdir, vsinfo) if mode ~= config.mode() or arch ~= config.arch() then -- modify config + config.set("as", nil, {force = true}) -- force to re-check as for ml/ml64 config.set("mode", mode, {readonly = true, force = true}) config.set("arch", arch, {readonly = true, force = true}) |
