diff options
| author | ruki <[email protected]> | 2017-07-23 00:24:15 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-07-23 00:24:15 +0800 |
| commit | 4e475c99d1fd2e8d180826b47a5a232db6377912 (patch) | |
| tree | 578d9c3449dc34e93c51ff5785dacfdd9af7f9a6 /xmake | |
| parent | 4d727dd8bb0056275904ea20fc1cbc9c48901b8c (diff) | |
update docs about compiler
Diffstat (limited to 'xmake')
| -rw-r--r-- | xmake/core/sandbox/modules/import/core/tool/compiler.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/core/sandbox/modules/import/core/tool/compiler.lua b/xmake/core/sandbox/modules/import/core/tool/compiler.lua index c12ff52e4..4566a50ba 100644 --- a/xmake/core/sandbox/modules/import/core/tool/compiler.lua +++ b/xmake/core/sandbox/modules/import/core/tool/compiler.lua @@ -279,13 +279,17 @@ end -- has the given flags? -- --- @param sourcekind the source kind, .e.g cc, cxx, sc, gc, dc, rc, .. +-- @param langkind the language kind, .e.g c, cxx, mm, mxx, swift, go, rust, d, as -- @param flags the flags -- -- @return the supported flags or nil -- -function sandbox_core_tool_compiler.has_flags(sourcekind, flags) +function sandbox_core_tool_compiler.has_flags(langkind, flags) + -- get sourcekind from the language kind + local sourcekind = language.langkinds()[langkind] + assert(sourcekind, "unknown language kind: " .. langkind) + -- get the compiler instance local instance, errors = compiler.load(sourcekind) if not instance then |
