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

Loading…
Cancel
Save