diff options
Diffstat (limited to 'xmake/modules/detect/tools/zig/has_flags.lua')
| -rw-r--r-- | xmake/modules/detect/tools/zig/has_flags.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xmake/modules/detect/tools/zig/has_flags.lua b/xmake/modules/detect/tools/zig/has_flags.lua index 1d8f8161b..0feecbe43 100644 --- a/xmake/modules/detect/tools/zig/has_flags.lua +++ b/xmake/modules/detect/tools/zig/has_flags.lua @@ -60,7 +60,7 @@ function _check_from_arglist(flags, opt, islinker) -- get argument list allflags = {} - local arglist = os.iorunv(opt.program, {"--help"}) + local arglist = os.iorunv(opt.program, {"build-obj", "--help"}) if arglist then for arg in arglist:gmatch("%s+(%-[%-%a%d]+)%s+") do allflags[arg] = true @@ -81,13 +81,12 @@ function _check_try_running(flags, opt, islinker) -- make an stub source file local sourcefile = path.join(os.tmpdir(), "detect", "zig_has_flags.zig") - local objectdir = path.join(os.tmpdir(), "detect", "zig_has_flags") if not os.isfile(sourcefile) then io.writefile(sourcefile, "pub fn main() !void {}") end -- init argv - local argv = table.join(flags, "--output-dir", objectdir, sourcefile) + local argv = table.join(flags, "-femit-bin=" .. os.tmpfile(), sourcefile) if islinker then table.insert(argv, 1, "build-exe") else |
