Browse Source

add runtime link for boost

ruki 6 năm trước cách đây
mục cha
commit
c0cc9a51de
1 tập tin đã thay đổi với 7 bổ sung1 xóa
  1. 7 1
      packages/b/boost/xmake.lua

+ 7 - 1
packages/b/boost/xmake.lua

@@ -96,6 +96,7 @@ package("boost")
             "-sNO_ZSTD=1",
             "-sNO_ZSTD=1",
             "install",
             "install",
             "threading=" .. (package:config("multi") and "multi" or "single"),
             "threading=" .. (package:config("multi") and "multi" or "single"),
+            "debug-symbols=" .. (package:debug() and "on" or "off"),
             "link=static",
             "link=static",
             "cxxflags=-std=c++14"
             "cxxflags=-std=c++14"
         }
         }
@@ -105,7 +106,12 @@ package("boost")
         else
         else
             table.insert(argv, "address-model=32")
             table.insert(argv, "address-model=32")
         end
         end
-        table.insert(argv, "debug-symbols=" .. (package:debug() and "on" or "off"))
+        if package:plat() == "windows" then
+            local vs_runtime = package:config("vs_runtime")
+            if vs_runtime and vs_runtime:startswith("MT") then
+                table.insert(argv, "runtime-link=static")
+            end
+        end
         if is_host("windows") then
         if is_host("windows") then
             os.vrunv("bootstrap.bat", bootstrap_argv)
             os.vrunv("bootstrap.bat", bootstrap_argv)
         else
         else