diff options
| author | ruki <[email protected]> | 2016-07-09 15:08:28 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-07-09 15:08:28 +0800 |
| commit | 9feb387e4e4e6694b2c9ac3de4d517fb4c4ae44a (patch) | |
| tree | 9581332e5365025b5663c3c48f223a9dfd6f415c /xmake/tools/swiftc.lua | |
| parent | 460030d64886772601749b874f06fe536f1d3fd5 (diff) | |
fix install directory and modify compiler and linker interfaces
Diffstat (limited to 'xmake/tools/swiftc.lua')
| -rw-r--r-- | xmake/tools/swiftc.lua | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/xmake/tools/swiftc.lua b/xmake/tools/swiftc.lua index 466f90f72..cb391b0f8 100644 --- a/xmake/tools/swiftc.lua +++ b/xmake/tools/swiftc.lua @@ -74,10 +74,24 @@ function get(name) end -- make the compile command -function compcmd(srcfile, objfile, flags) +function compcmd(sourcefile, objectfile, flags) -- make it - return format("%s -c %s -o %s %s", _g.shellname, flags, objfile, srcfile) + return format("%s -c %s -o %s %s", _g.shellname, flags, objectfile, sourcefile) +end + +-- complie the source file +function compile(sourcefile, objectfile, flags, multitasking) + + -- ensure the object directory + os.mkdir(path.directory(objectfile)) + + -- compile it + if multitasking then + os.corun(compcmd(sourcefile, objectfile, flags)) + else + os.run(compcmd(sourcefile, objectfile, flags)) + end end -- make the includedir flag @@ -113,5 +127,4 @@ function check(flags) -- check it os.run("%s -h", _g.shellname) - end |
