diff options
| author | cofecofe <[email protected]> | 2024-06-24 15:31:54 +0800 |
|---|---|---|
| committer | cofecofe <[email protected]> | 2024-06-24 15:31:54 +0800 |
| commit | 325cc705e90699ae827bdcb0f48c2e596900b86c (patch) | |
| tree | e14e8d73aded1d2932ad07bb7fc7ca3da80bf1fc /xmake/modules/detect | |
| parent | fa31b585a779625eb70954b37aac7bb7df4a5518 (diff) | |
change different module to get compiler version.
Diffstat (limited to 'xmake/modules/detect')
| -rw-r--r-- | xmake/modules/detect/sdks/find_mdk.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_armclang.lua | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/detect/sdks/find_mdk.lua b/xmake/modules/detect/sdks/find_mdk.lua index 231b3cf4d..a2af360f1 100644 --- a/xmake/modules/detect/sdks/find_mdk.lua +++ b/xmake/modules/detect/sdks/find_mdk.lua @@ -73,8 +73,6 @@ function _find_mdk(sdkdir) -- armclang sdk directory local sdkdir_armclang = path.join(sdkdir, "armclang") if os.isdir(sdkdir_armclang) and os.isfile(path.join(sdkdir_armclang, "bin", "armclang.exe")) then - local sdk_armclang_ver = os.iorun(path.join(sdkdir_armclang, "bin", "armclang.exe").." --version_number") - result.sdk_armclang_vernum = tonumber(sdk_armclang_ver) result.sdkdir_armclang = sdkdir_armclang end return result diff --git a/xmake/modules/detect/tools/find_armclang.lua b/xmake/modules/detect/tools/find_armclang.lua index ed6b0bbfe..6232138c9 100644 --- a/xmake/modules/detect/tools/find_armclang.lua +++ b/xmake/modules/detect/tools/find_armclang.lua @@ -39,7 +39,9 @@ import("detect.sdks.find_mdk") function main(opt) -- init options - opt = opt or {} + opt = opt or {} + opt.command = opt.command or "--version" + opt.parse = opt.parse or function (output) return output:match("Arm Compiler for Embedded (%d+%.?%d+%.?%d+)%s") end -- find program local program = find_program(opt.program or "armclang.exe", opt) |
