diff options
| author | ruki <[email protected]> | 2020-03-21 21:55:49 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-03-21 21:55:49 +0800 |
| commit | 1429067bf099b4880c000421e8b53d3c3341f66d (patch) | |
| tree | 2fc0124e074ab9278cbf0256ab7820ccaebc8afd /xmake/modules/core/tools/cl.lua | |
| parent | 114545bb164cba3de59e4083fa4170f8f851f3d7 (diff) | |
add clang-cl
Diffstat (limited to 'xmake/modules/core/tools/cl.lua')
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index fb2d69a53..4080bb056 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -292,7 +292,7 @@ function add_sourceflags(self, sourcefile, fileconfig, target, targetkind) end -- make the compile arguments list for the precompiled header -function _compargv1_pch(self, pcheaderfile, pcoutputfile, flags) +function _compargv_pch(self, pcheaderfile, pcoutputfile, flags) -- remove "-Yuxxx.h" and "-Fpxxx.pch" local pchflags = {} @@ -314,12 +314,12 @@ function _compargv1_pch(self, pcheaderfile, pcoutputfile, flags) end -- make the compile arguments list -function _compargv1(self, sourcefile, objectfile, flags) +function compargv(self, sourcefile, objectfile, flags) -- precompiled header? local extension = path.extension(sourcefile) if (extension:startswith(".h") or extension == ".inl") then - return _compargv1_pch(self, sourcefile, objectfile, flags) + return _compargv_pch(self, sourcefile, objectfile, flags) end -- make the compile arguments list @@ -327,7 +327,7 @@ function _compargv1(self, sourcefile, objectfile, flags) end -- compile the source file -function _compile1(self, sourcefile, objectfile, dependinfo, flags) +function compile(self, sourcefile, objectfile, dependinfo, flags) -- ensure the object directory -- @note this path here has been normalized, we can quickly find it by the unique path separator prompt @@ -348,7 +348,7 @@ function _compile1(self, sourcefile, objectfile, dependinfo, flags) end -- use vstool to compile and enable vs_unicode_output @see https://github.com/xmake-io/xmake/issues/528 - return vstool.iorunv(_compargv1(self, sourcefile, objectfile, compflags)) + return vstool.iorunv(compargv(self, sourcefile, objectfile, compflags)) end, catch { @@ -411,23 +411,3 @@ function _compile1(self, sourcefile, objectfile, dependinfo, flags) end end --- make the compile arguments list -function compargv(self, sourcefiles, objectfile, flags) - - -- only support single source file now - assert(type(sourcefiles) ~= "table", "'object:sources' not support!") - - -- for only single source file - return _compargv1(self, sourcefiles, objectfile, flags) -end - --- compile the source file -function compile(self, sourcefiles, objectfile, dependinfo, flags) - - -- only support single source file now - assert(type(sourcefiles) ~= "table", "'object:sources' not support!") - - -- for only single source file - _compile1(self, sourcefiles, objectfile, dependinfo, flags) -end - |
