diff options
| author | ruki <[email protected]> | 2024-04-17 22:51:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-04-17 22:51:45 +0800 |
| commit | 08250fcd9265cc7fe10f890199c5847a79491bef (patch) | |
| tree | 58ec5103f0c6f0f1d567af621193f029a901341e /xmake/core/base | |
| parent | 2190b08db954738da36feeb820e8771383caa5e0 (diff) | |
improve select_script test
Diffstat (limited to 'xmake/core/base')
| -rw-r--r-- | xmake/core/base/private/select_script.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/xmake/core/base/private/select_script.lua b/xmake/core/base/private/select_script.lua index 243e41a60..35722edd9 100644 --- a/xmake/core/base/private/select_script.lua +++ b/xmake/core/base/private/select_script.lua @@ -37,9 +37,6 @@ function _match_pattern(pattern, plat, arch, opt) local is_excluded_pattern = pattern_plat:find('!', 1, true) if excluded and is_excluded_pattern then matched = not ('!' .. plat):match('^' .. pattern_plat .. '$') - if matched then - return true - end elseif not is_excluded_pattern then matched = plat:match('^' .. pattern_plat .. '$') end @@ -158,6 +155,12 @@ function _match_script_pattern(pattern, opt) end -- match the script expression pattern +-- +-- e.g. +-- !wasm|!arm* and !cross|!arm* +-- wasm|!arm* or cross +-- (!macosx and !iphoneos) or (!linux|!arm* and !cross|!arm*) +-- function _match_script(pattern, opt) local idx = 0 local funcs = {} |
