summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaikari <[email protected]>2026-02-20 17:58:04 +0300
committerSaikari <[email protected]>2026-02-20 17:58:04 +0300
commit97a4ee37a0057c670ba09003dc67ed50bc35fae4 (patch)
tree73ceee84ae70919eb1d9c8b4aa64918e4c0b444d
parent3d947bc6913b230138aaac67e9c22ed682c50560 (diff)
resolve gemini
-rw-r--r--core/src/xmake/winos/file_signature.c10
-rw-r--r--xmake/modules/detect/tools/find_gcc.lua16
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