diff options
| author | ruki <[email protected]> | 2022-10-08 00:32:24 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-10-08 00:32:24 +0800 |
| commit | 664ef028094a250e06521b4a3bdb2a3a5fb567e6 (patch) | |
| tree | 867a3ba5d901b01575574afa2649adf556352892 /xmake/modules/core/tools/nvcc.lua | |
| parent | d8260f9ef9224739a30d50a419ca8e86eb21976d (diff) | |
use self:is_plat for tools
Diffstat (limited to 'xmake/modules/core/tools/nvcc.lua')
| -rw-r--r-- | xmake/modules/core/tools/nvcc.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua index 823872b5e..33c687695 100644 --- a/xmake/modules/core/tools/nvcc.lua +++ b/xmake/modules/core/tools/nvcc.lua @@ -31,7 +31,7 @@ import("utils.progress") function init(self) -- init cuflags - if not is_plat("windows", "mingw") then + if not self:is_plat("windows", "mingw") then self:set("shared.cuflags", "-Xcompiler -fPIC") self:set("binary.cuflags", "-Xcompiler -fPIE") end @@ -59,7 +59,7 @@ function nf_symbol(self, level, target) local flags = nil if level == "debug" then flags = {"-g", "-lineinfo"} - if is_plat("windows") then + if self:is_plat("windows") then local host_flags = nil local symbolfile = nil if target and target.symbolfile then @@ -136,7 +136,7 @@ function nf_warning(self, level) -- for gcc/clang, or any gnu compatible compiler on *nix -- local host_warning = nil - if is_plat("windows") then + if self:is_plat("windows") then host_warning = cl_maps[level] else host_warning = gcc_clang_maps[level] @@ -269,7 +269,7 @@ function linkargv(self, objectfiles, targetkind, targetfile, flags) end -- add `-Wl,--out-implib,outputdir/libxxx.a` for xxx.dll on mingw/gcc - if targetkind == "shared" and is_plat("mingw") then + if targetkind == "shared" and self:is_plat("mingw") then table.insert(flags_extra, "-Xlinker") table.insert(flags_extra, "-Wl,--out-implib," .. path.join(path.directory(targetfile), path.basename(targetfile) .. ".dll.a")) end |
