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/core/tools/gcc.lua | |
| parent | af7907d7adc0c60930477730876f0ed74d3a9f5a (diff) | |
translate path for gcc and cl
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 7 |
1 files changed, 4 insertions, 3 deletions
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 |
