diff options
| author | ruki <[email protected]> | 2020-09-25 00:33:07 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-09-25 00:33:07 +0800 |
| commit | 90af4956738036172984f068502624bbc515cae7 (patch) | |
| tree | 7cd7177becaf98e676ae8eaa478f042e14505d3a /xmake/modules/detect/tools/ml/has_flags.lua | |
| parent | 700f08a7bae11c22295f884610f98b7b99eb1790 (diff) | |
fix trailing white-space
Diffstat (limited to 'xmake/modules/detect/tools/ml/has_flags.lua')
| -rw-r--r-- | xmake/modules/detect/tools/ml/has_flags.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xmake/modules/detect/tools/ml/has_flags.lua b/xmake/modules/detect/tools/ml/has_flags.lua index 21641d91d..e7a4d53ef 100644 --- a/xmake/modules/detect/tools/ml/has_flags.lua +++ b/xmake/modules/detect/tools/ml/has_flags.lua @@ -11,7 +11,7 @@ -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. --- +-- -- Copyright (C) 2015-2020, TBOOX Open Source Group. -- -- @author ruki @@ -21,12 +21,12 @@ -- imports import("lib.detect.cache") --- attempt to check it from the argument list +-- attempt to check it from the argument list function _check_from_arglist(flags, opt) -- only one flag? if #flags > 1 then - return + return end -- make cache key @@ -71,26 +71,26 @@ function _check_try_running(flags, opt) -- check it local errors = nil - return try { function () + return try { function () local _, errs = os.iorunv(opt.program, table.join("-c", "-nologo", flags, "-Fo" .. os.nuldev(), sourcefile), {envs = opt.envs}) if errs and #errs:trim() > 0 then return false, errs end - return true + return true end, catch { function (errs) errors = errs end } }, errors end -- has_flags(flags)? --- +-- -- @param opt the argument options, e.g. {toolname = "", program = "", programver = "", toolkind = "[cc|cxx|ld|ar|sh|gc|rc|dc|mm|mxx]"} -- -- @return true or false -- function main(flags, opt) - -- attempt to check it from the argument list + -- attempt to check it from the argument list if _check_from_arglist(flags, opt) then return true end |
