Browse Source

Support to control `lto` flag in boost (#1577)

Co-authored-by: Garfield Kuang <[email protected]>
garfieldkwong 2 years ago
parent
commit
deb0bf9eb0
1 changed files with 4 additions and 0 deletions
  1. 4 0
      packages/b/boost/xmake.lua

+ 4 - 0
packages/b/boost/xmake.lua

@@ -166,6 +166,10 @@ package("boost")
             "debug-symbols=" .. (package:debug() and "on" or "off"),
             "debug-symbols=" .. (package:debug() and "on" or "off"),
             "link=" .. (package:config("shared") and "shared" or "static")
             "link=" .. (package:config("shared") and "shared" or "static")
         }
         }
+
+        if package:config("lto") then
+            table.insert(argv, "lto=on")
+        end
         if package:is_arch(".+64.*") then
         if package:is_arch(".+64.*") then
             table.insert(argv, "address-model=64")
             table.insert(argv, "address-model=64")
         else
         else