diff options
| author | ruki <[email protected]> | 2019-05-23 22:21:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-05-23 08:07:37 +0800 |
| commit | 7434ac208724ea5840e32040fda9601feb4dd722 (patch) | |
| tree | 01354815e47eb7dd2e57909024432d57576a81ef /xmake/modules | |
| parent | af7907d7adc0c60930477730876f0ed74d3a9f5a (diff) | |
translate path for gcc and cl
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 7 | ||||
| -rw-r--r-- | xmake/modules/core/tools/link.lua | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 08a17ff8e..4464b6ca1 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -234,7 +234,7 @@ end -- make the includedir flag function nf_includedir(self, dir) - return "-I" .. os.args(dir) + return "-I" .. os.args(path.translate(dir)) end -- make the c precompiled header flag diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 99daa755a..d208f1fcd 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -233,7 +233,7 @@ end -- make the includedir flag function nf_includedir(self, dir) - return "-I" .. os.args(dir) + return "-I" .. os.args(path.translate(dir)) end -- make the link flag @@ -248,11 +248,12 @@ end -- make the linkdir flag function nf_linkdir(self, dir) - return "-L" .. os.args(dir) + return "-L" .. os.args(path.translate(dir)) end -- make the rpathdir flag function nf_rpathdir(self, dir) + dir = path.translate(dir) if self:has_flags("-Wl,-rpath=" .. dir, "ldflags") then return "-Wl,-rpath=" .. os.args(dir:gsub("@[%w_]+", function (name) local maps = {["@loader_path"] = "$ORIGIN", ["@executable_path"] = "$ORIGIN"} @@ -270,7 +271,7 @@ end -- make the frameworkdir flag function nf_frameworkdir(self, frameworkdir) - return "-F " .. os.args(frameworkdir) + return "-F " .. os.args(path.translate(frameworkdir)) end -- make the c precompiled header flag diff --git a/xmake/modules/core/tools/link.lua b/xmake/modules/core/tools/link.lua index cf6596fce..715c3e78a 100644 --- a/xmake/modules/core/tools/link.lua +++ b/xmake/modules/core/tools/link.lua @@ -86,7 +86,7 @@ end -- make the linkdir flag function nf_linkdir(self, dir) - return "-libpath:" .. os.args(dir) + return "-libpath:" .. os.args(path.translate(dir)) end -- make the link arguments list |
