diff options
| author | ruki <[email protected]> | 2022-05-18 23:11:24 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-05-18 23:11:24 +0800 |
| commit | 3674a502ae48035813cac69525162d7a7f89ba28 (patch) | |
| tree | 082a724b34d8561abf0065c02f399acfac795f3f /xmake/core/tool/compiler.lua | |
| parent | 30350e0801018bd2523123c19c98f2bcd4807566 (diff) | |
fix tests
Diffstat (limited to 'xmake/core/tool/compiler.lua')
| -rw-r--r-- | xmake/core/tool/compiler.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xmake/core/tool/compiler.lua b/xmake/core/tool/compiler.lua index 9bb51e001..db6badf76 100644 --- a/xmake/core/tool/compiler.lua +++ b/xmake/core/tool/compiler.lua @@ -242,10 +242,8 @@ end -- compile the source files function compiler:compile(sourcefiles, objectfile, opt) - -- init options - opt = opt or {} - -- get compile flags + opt = opt or {} local compflags = opt.compflags if not compflags then -- patch sourcefile to get flags of the given source file @@ -256,6 +254,7 @@ function compiler:compile(sourcefiles, objectfile, opt) end -- compile it + opt = table.copy(opt) opt.target = self:target() return sandbox.load(self:_tool().compile, self:_tool(), sourcefiles, objectfile, opt.dependinfo, compflags, opt) end |
