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/gcc.lua | |
| parent | 114545bb164cba3de59e4083fa4170f8f851f3d7 (diff) | |
add clang-cl
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 071a8140a..7b17a3a10 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -378,7 +378,7 @@ function _has_color_diagnostics(self) 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 "-include xxx.h" and "-include-pch xxx.pch" local pchflags = {} @@ -405,18 +405,18 @@ 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 return ccache.cmdargv(self:program(), table.join("-c", flags, "-o", objectfile, sourcefile)) 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 @@ -446,7 +446,7 @@ function _compile1(self, sourcefile, objectfile, dependinfo, flags) end -- do compile - return os.iorunv(_compargv1(self, sourcefile, objectfile, compflags)) + return os.iorunv(compargv(self, sourcefile, objectfile, compflags)) end, catch { @@ -504,23 +504,3 @@ function _compile1(self, sourcefile, objectfile, dependinfo, flags) } 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 - |
