From c0cc9a51de33aa3439689b5a7ecdef7034e23229 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 22 Jul 2019 23:25:14 +0800 Subject: [PATCH] add runtime link for boost --- packages/b/boost/xmake.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/b/boost/xmake.lua b/packages/b/boost/xmake.lua index ac27af0dd..160a31bb5 100644 --- a/packages/b/boost/xmake.lua +++ b/packages/b/boost/xmake.lua @@ -96,6 +96,7 @@ package("boost") "-sNO_ZSTD=1", "install", "threading=" .. (package:config("multi") and "multi" or "single"), + "debug-symbols=" .. (package:debug() and "on" or "off"), "link=static", "cxxflags=-std=c++14" } @@ -105,7 +106,12 @@ package("boost") else table.insert(argv, "address-model=32") 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 os.vrunv("bootstrap.bat", bootstrap_argv) else