diff options
| author | ruki <[email protected]> | 2016-01-15 14:10:09 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-01-15 14:10:09 +0800 |
| commit | 3e74be5e0c38ec84efbc407edb7be1a92a9adfee (patch) | |
| tree | a0b6edd273bc9cb670a9aedfa627e9ebe13048f1 | |
| parent | 8ea8217d37da8b9f240d23e3929dbc64142e881c (diff) | |
fix add_files(*.a) bug
| -rw-r--r-- | xmake/core/base/compiler.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xmake/core/base/compiler.lua b/xmake/core/base/compiler.lua index 3a9cd6b51..58e3757e8 100644 --- a/xmake/core/base/compiler.lua +++ b/xmake/core/base/compiler.lua @@ -352,6 +352,8 @@ function compiler._kind(srcfile) elseif filetype == ".mm" then kind = "mxx" elseif filetype == ".s" or filetype == ".asm" then kind = "as" elseif filetype == ".swift" then kind = "sc" + elseif filetype == ".a" or filetype == ".lib" then kind = "lib" + elseif filetype == ".o" or filetype == ".obj" then kind = "obj" end -- ok @@ -399,6 +401,11 @@ function compiler.get(srcfile) return nil, string.format("unknown source file: %s", srcfile) end + -- ignore "*.a/lib" and "*.o/obj" kind + if kind == "lib" or kind == "obj" then + return {} + end + -- get compiler from the source file type local module = tools.get(kind) if module then |
