diff options
Diffstat (limited to 'xmake/scripts/base')
| -rw-r--r-- | xmake/scripts/base/compiler.lua | 2 | ||||
| -rw-r--r-- | xmake/scripts/base/linker.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/xmake/scripts/base/compiler.lua b/xmake/scripts/base/compiler.lua index 64b385a5c..5fa96b93e 100644 --- a/xmake/scripts/base/compiler.lua +++ b/xmake/scripts/base/compiler.lua @@ -48,7 +48,7 @@ function compiler._mapflag(module, flag) -- find and replace it using pattern for k, v in pairs(module.mapflags) do - local flag_mapped, count = flag:gsub(k, function (w) + local flag_mapped, count = flag:gsub("^" .. k .. "$", function (w) if type(v) == "function" then return v(module, w) else diff --git a/xmake/scripts/base/linker.lua b/xmake/scripts/base/linker.lua index 0f9ae1887..f8d2c81a8 100644 --- a/xmake/scripts/base/linker.lua +++ b/xmake/scripts/base/linker.lua @@ -45,7 +45,7 @@ function linker._mapflag(module, flag) -- find and replace it using pattern for k, v in pairs(module.mapflags) do - local flag_mapped, count = flag:gsub(k, function (w) + local flag_mapped, count = flag:gsub("^" .. k .. "$", function (w) if type(v) == "function" then return v(module, w) else |
