diff options
| -rw-r--r-- | xmake/rules/c++/build_optimization/load.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/rules/c++/build_optimization/load.lua b/xmake/rules/c++/build_optimization/load.lua index 38dc3847b..b5bdf07a1 100644 --- a/xmake/rules/c++/build_optimization/load.lua +++ b/xmake/rules/c++/build_optimization/load.lua @@ -29,7 +29,7 @@ function _add_lto_optimization(target, sourcekind) local _, cc = target:tool(sourcekind) local cflag = sourcekind == "cxx" and "cxxflags" or "cflags" if cc == "cl" then - -- TODO + target:add(cflag, "-GL") elseif cc == "clang" or cc == "clangxx" then target:add(cflag, "-flto=thin") elseif cc == "gcc" or cc == "gxx" then @@ -39,7 +39,8 @@ function _add_lto_optimization(target, sourcekind) -- add ldflags and shflags local _, ld = target:tool("ld") if ld == "cl" then - -- TODO + target:add("ldflags", "-LTCG") + target:add("shflags", "-LTCG") elseif ld == "clang" or ld == "clangxx" then target:add("ldflags", "-flto=thin") target:add("shflags", "-flto=thin") |
