summaryrefslogtreecommitdiff
path: root/xmake/modules/detect/tools
diff options
context:
space:
mode:
authorruki <[email protected]>2018-08-24 23:55:06 +0800
committerruki <[email protected]>2018-08-24 17:30:39 +0800
commitf0fe86cec304f73c78f97356968f91be033026fa (patch)
tree5a44aa9b8fa238951ddc991fa78b9a3403c1d622 /xmake/modules/detect/tools
parente7bae1207a1b97850eeaffe05b67df8a8f1526dc (diff)
fix dlang has_flags bug
Diffstat (limited to 'xmake/modules/detect/tools')
-rw-r--r--xmake/modules/detect/tools/dmd/has_flags.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/detect/tools/dmd/has_flags.lua b/xmake/modules/detect/tools/dmd/has_flags.lua
index 58e52193d..7e33b5ab0 100644
--- a/xmake/modules/detect/tools/dmd/has_flags.lua
+++ b/xmake/modules/detect/tools/dmd/has_flags.lua
@@ -91,12 +91,13 @@ function _check_try_running(flags, opt, islinker)
-- make an stub source file
local sourcefile = path.join(os.tmpdir(), "detect", "dmd_has_flags.d")
+ local objectfile = path.join(os.tmpdir(), "detect", "dmd_has_flags.o")
if not os.isfile(sourcefile) then
io.writefile(sourcefile, "void main() {\n}")
end
-- init argv
- local argv = table.join(flags, "-of" .. os.nuldev(), sourcefile)
+ local argv = table.join(flags, "-of" .. objectfile, sourcefile)
if not islinker then
table.insert(argv, 1, "-c")
end