summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/base/os.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua
index 24e055eb9..4263cf659 100644
--- a/xmake/core/base/os.lua
+++ b/xmake/core/base/os.lua
@@ -1158,6 +1158,12 @@ function os.isexec(filepath)
return true
end
else
+ -- detect executable file header
+ --
+ -- @note only for files without extension, because .dll is also PE
+ -- pe: native windows executables
+ -- ape: cosmocc/APE executables (e.g. `cosmocc -o foo.exe ...`)
+ -- shebang: scripts starting with `#!`
local format = nil
if binutils and binutils.format then
format = binutils.format(filepath)