diff options
| -rw-r--r-- | core/src/xmake/winos/file_signature.c | 10 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_gcc.lua | 16 |
2 files changed, 2 insertions, 24 deletions
diff --git a/core/src/xmake/winos/file_signature.c b/core/src/xmake/winos/file_signature.c index e16cb4949..2efa8bd8c 100644 --- a/core/src/xmake/winos/file_signature.c +++ b/core/src/xmake/winos/file_signature.c @@ -54,16 +54,6 @@ typedef struct __tb_file_signature_info_t { /* ////////////////////////////////////////////////////////////////////////////////////// * private implementation */ -static tb_wchar_t* tb_path_to_wchar(tb_char_t const* path, tb_wchar_t* buffer, tb_size_t size) { - // check - tb_assert_and_check_return_val(path && buffer && size, tb_null); - - // convert - if (MultiByteToWideChar(CP_UTF8, 0, path, -1, buffer, (int)size) > 0) - return buffer; - - return tb_null; -} static tb_bool_t tb_file_get_signature_info(tb_char_t const* filepath, tb_file_signature_info_t* info) { // check diff --git a/xmake/modules/detect/tools/find_gcc.lua b/xmake/modules/detect/tools/find_gcc.lua index 83ee0fe59..d658ca1ff 100644 --- a/xmake/modules/detect/tools/find_gcc.lua +++ b/xmake/modules/detect/tools/find_gcc.lua @@ -44,20 +44,8 @@ end -- @see https://github.com/xmake-io/xmake/issues/5629 function _check_gcc_on_windows(program, opt) opt = opt or {} - if path.is_absolute(program) then - if check_gcc_gigabyte(program) then - raise("gcc.exe signed by GIGA-BYTE is not allowed!") - end - else - local paths = path.splitenv(vformat("$(env PATH)")) - if paths then - for _, p in ipairs(paths) do - local prog = path.join(p, program) - if os.isfile(prog) and check_gcc_gigabyte(prog) then - raise("gcc.exe signed by GIGA-BYTE is not allowed!") - end - end - end + if check_gcc_gigabyte(program) then + raise("gcc.exe signed by GIGA-BYTE is not allowed!") end return os.runv(program, {"--version"}, {envs = opt.envs, shell = opt.shell}) end |
