Fix missing `numpy` when linking boost.python and linking wrong library name when turn debug on. (#2262)

Co-authored-by: Garfield Kuang <garfield.kuang@yubosecurities.com>
pull/2264/head
garfieldkwong 1 year ago committed by GitHub
parent 532e74c0f3
commit 1164514e92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      packages/b/boost/xmake.lua

@ -84,7 +84,7 @@ package("boost")
else else
linkname = "boost_" .. libname linkname = "boost_" .. libname
end end
if libname == "python" then if libname == "python" or libname == "numpy" then
linkname = linkname .. package:config("pyver"):gsub("%p+", "") linkname = linkname .. package:config("pyver"):gsub("%p+", "")
end end
if package:config("multi") then if package:config("multi") then
@ -103,11 +103,16 @@ package("boost")
elseif vs_runtime == "MDd" then elseif vs_runtime == "MDd" then
linkname = linkname .. "-gd" linkname = linkname .. "-gd"
end end
else
if package:debug() then
linkname = linkname .. "-d"
end
end end
return linkname return linkname
end end
-- we need the fixed link order -- we need the fixed link order
local sublibs = {log = {"log_setup", "log"}, local sublibs = {log = {"log_setup", "log"},
python = {"python", "numpy"},
stacktrace = {"stacktrace_backtrace", "stacktrace_basic"}} stacktrace = {"stacktrace_backtrace", "stacktrace_basic"}}
for _, libname in ipairs(libnames) do for _, libname in ipairs(libnames) do
local libs = sublibs[libname] local libs = sublibs[libname]

Loading…
Cancel
Save