diff options
| author | ruki <[email protected]> | 2017-09-28 23:44:36 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-09-28 16:27:39 +0800 |
| commit | b0c6c6c058dfe7fe21f42da4da8c8f03fbdb8951 (patch) | |
| tree | 158a4a65af66c79a3c550393eeb4d12ee3aed206 /xmake/modules | |
| parent | 603ecaeb969342384e55b1fe92ed6d55d8ea970c (diff) | |
fix compile error with space path
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 6 | ||||
| -rw-r--r-- | xmake/modules/core/tools/dmd.lua | 6 | ||||
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 18 | ||||
| -rw-r--r-- | xmake/modules/core/tools/go.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/core/tools/link.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/core/tools/ml.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/core/tools/rc.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/core/tools/rustc.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/core/tools/swiftc.lua | 6 |
9 files changed, 24 insertions, 24 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 81da0f528..23fcd9086 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -220,7 +220,7 @@ end -- make the includedir flag function nf_includedir(self, dir) - return "-I" .. dir + return "-I" .. os.args(dir) end -- make the c precompiled header flag @@ -236,7 +236,7 @@ function nf_pcheader(self, pcheaderfile, target) end -- make flag - return "-Yu" .. path.filename(pcheaderfile) .. " -FI" .. path.filename(pcheaderfile) .. " -Fp" .. target:pcoutputfile("c") + return "-Yu" .. path.filename(pcheaderfile) .. " -FI" .. path.filename(pcheaderfile) .. " -Fp" .. os.args(target:pcoutputfile("c")) end end @@ -253,7 +253,7 @@ function nf_pcxxheader(self, pcheaderfile, target) end -- make flag - return "-Yu" .. path.filename(pcheaderfile) .. " -FI" .. path.filename(pcheaderfile) .. " -Fp" .. target:pcoutputfile("cxx") + return "-Yu" .. path.filename(pcheaderfile) .. " -FI" .. path.filename(pcheaderfile) .. " -Fp" .. os.args(target:pcoutputfile("cxx")) end end diff --git a/xmake/modules/core/tools/dmd.lua b/xmake/modules/core/tools/dmd.lua index f2a951925..0c6db3844 100644 --- a/xmake/modules/core/tools/dmd.lua +++ b/xmake/modules/core/tools/dmd.lua @@ -129,7 +129,7 @@ end -- make the includedir flag function nf_includedir(self, dir) - return "-I" .. dir + return "-I" .. os.args(dir) end -- make the link flag @@ -139,12 +139,12 @@ end -- make the linkdir flag function nf_linkdir(self, dir) - return "-L-L" .. dir + return "-L-L" .. os.args(dir) end -- make the rpathdir flag function nf_rpathdir(self, dir) - local flag = "-L-rpath=" .. dir + local flag = "-L-rpath=" .. os.args(dir) if self:has_flags(flag) then return flag end diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index e011d8c68..007ce26bb 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -219,7 +219,7 @@ end -- make the includedir flag function nf_includedir(self, dir) - return "-I" .. dir + return "-I" .. os.args(dir) end -- make the link flag @@ -229,18 +229,18 @@ end -- make the linkdir flag function nf_linkdir(self, dir) - return "-L" .. dir + return "-L" .. os.args(dir) end -- make the rpathdir flag function nf_rpathdir(self, dir) if self:has_flags("-Wl,-rpath=" .. dir) then - return "-Wl,-rpath=" .. (dir:gsub("@[%w_]+", function (name) + return "-Wl,-rpath=" .. os.args(dir:gsub("@[%w_]+", function (name) local maps = {["@loader_path"] = "$ORIGIN", ["@executable_path"] = "$ORIGIN"} return maps[name] end)) elseif self:has_flags("-Xlinker -rpath -Xlinker " .. dir) then - return "-Xlinker -rpath -Xlinker " .. (dir:gsub("%$ORIGIN", "@loader_path")) + return "-Xlinker -rpath -Xlinker " .. os.args(dir:gsub("%$ORIGIN", "@loader_path")) end end @@ -251,16 +251,16 @@ end -- make the frameworkdir flag function nf_frameworkdir(self, frameworkdir) - return "-F " .. frameworkdir + return "-F " .. os.args(frameworkdir) end -- make the c precompiled header flag function nf_pcheader(self, pcheaderfile, target) if self:kind() == "cc" then if self:name() == "clang" then - return "-include " .. pcheaderfile .. " -include-pch " .. target:pcoutputfile("c") + return "-include " .. os.args(pcheaderfile) .. " -include-pch " .. os.args(target:pcoutputfile("c")) else - return "-include " .. pcheaderfile + return "-include " .. os.args(pcheaderfile) end end end @@ -269,9 +269,9 @@ end function nf_pcxxheader(self, pcheaderfile, target) if self:kind() == "cxx" then if self:name() == "clang" then - return "-include " .. pcheaderfile .. " -include-pch " .. target:pcoutputfile("cxx") + return "-include " .. os.args(pcheaderfile) .. " -include-pch " .. os.args(target:pcoutputfile("cxx")) else - return "-include " .. pcheaderfile + return "-include " .. os.args(pcheaderfile) end end end diff --git a/xmake/modules/core/tools/go.lua b/xmake/modules/core/tools/go.lua index 1f1e8bda1..1979f37dd 100644 --- a/xmake/modules/core/tools/go.lua +++ b/xmake/modules/core/tools/go.lua @@ -96,12 +96,12 @@ end -- make the includedir flag function nf_includedir(self, dir) - return "-I " .. dir + return "-I " .. os.args(dir) end -- make the linkdir flag function nf_linkdir(self, dir) - return "-L " .. dir + return "-L " .. os.args(dir) end -- make the link arguments list diff --git a/xmake/modules/core/tools/link.lua b/xmake/modules/core/tools/link.lua index 3af9e4cb3..af0d23a21 100644 --- a/xmake/modules/core/tools/link.lua +++ b/xmake/modules/core/tools/link.lua @@ -91,7 +91,7 @@ end -- make the linkdir flag function nf_linkdir(self, dir) - return "-libpath:" .. dir + return "-libpath:" .. os.args(dir) end -- make the link arguments list diff --git a/xmake/modules/core/tools/ml.lua b/xmake/modules/core/tools/ml.lua index b60e063e7..a01f95d27 100644 --- a/xmake/modules/core/tools/ml.lua +++ b/xmake/modules/core/tools/ml.lua @@ -93,7 +93,7 @@ end -- make the includedir flag function nf_includedir(self, dir) - return "-I" .. dir + return "-I" .. os.args(dir) end -- make the complie arguments list diff --git a/xmake/modules/core/tools/rc.lua b/xmake/modules/core/tools/rc.lua index 9db2858da..0d4045362 100644 --- a/xmake/modules/core/tools/rc.lua +++ b/xmake/modules/core/tools/rc.lua @@ -53,7 +53,7 @@ end -- make the includedir flag function nf_includedir(self, dir) - return "-I" .. dir + return "-I" .. os.args(dir) end -- make the complie arguments list diff --git a/xmake/modules/core/tools/rustc.lua b/xmake/modules/core/tools/rustc.lua index 10cb653cf..89bde3690 100644 --- a/xmake/modules/core/tools/rustc.lua +++ b/xmake/modules/core/tools/rustc.lua @@ -91,7 +91,7 @@ end -- make the linkdir flag function nf_linkdir(self, dir) - return "-L" .. dir + return "-L" .. os.args(dir) end -- make the build arguments list diff --git a/xmake/modules/core/tools/swiftc.lua b/xmake/modules/core/tools/swiftc.lua index 320e93a08..461dd75bd 100644 --- a/xmake/modules/core/tools/swiftc.lua +++ b/xmake/modules/core/tools/swiftc.lua @@ -152,7 +152,7 @@ end -- make the includedir flag function nf_includedir(self, dir) - return "-Xcc -I" .. dir + return "-Xcc -I" .. os.args(dir) end -- make the define flag @@ -172,7 +172,7 @@ end -- make the frameworkdir flag function nf_frameworkdir(self, frameworkdir) - return "-F " .. frameworkdir + return "-F " .. os.args(frameworkdir) end -- make the link flag @@ -182,7 +182,7 @@ end -- make the linkdir flag function nf_linkdir(self, dir) - return "-L" .. dir + return "-L" .. os.args(dir) end -- make the link arguments list |
