diff options
| author | ruki <[email protected]> | 2021-04-06 00:08:35 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-04-06 00:08:35 +0800 |
| commit | 8c9cd50ea10f9f3bf83500453a5227f5c1e7b6bf (patch) | |
| tree | 67ea2c65b31b2215abf00f29808b606d9487f87a | |
| parent | 413c811f96ea6473b5028fd66592b3eee13422b8 (diff) | |
improve cpu features
| -rw-r--r-- | xmake/core/base/cpu.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/core/base/cpu.lua b/xmake/core/base/cpu.lua index bd89c23bc..1b7208590 100644 --- a/xmake/core/base/cpu.lua +++ b/xmake/core/base/cpu.lua @@ -231,12 +231,16 @@ function cpu._info() if line:find("Features=", 1, true) then local cpu_features = line:match("Features=.*<(.-)>") if cpu_features then - cpuinfo.cpu_features = (cpuinfo.cpu_features or "") .. " " .. cpu_features + if cpuinfo.cpu_features then + cpuinfo.cpu_features = cpuinfo.cpu_features .. "," .. cpu_features + else + cpuinfo.cpu_features = cpu_features + end end end end if cpuinfo.cpu_features then - cpuinfo.cpu_features = cpuinfo.cpu_features:lower() + cpuinfo.cpu_features = cpuinfo.cpu_features:lower():gsub(",", " ") end end end |
