try fixing boost using clang toolchain build shared lib (#4169)

pull/4171/head
c8ef 6 months ago committed by GitHub
parent 6865379c01
commit d3ad13f6da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      packages/b/boost/xmake.lua

@ -4,11 +4,13 @@ package("boost")
set_description("Collection of portable C++ source libraries.")
set_license("BSL-1.0")
add_urls("https://github.com/boostorg/boost/releases/download/boost-$(version)/boost-$(version)-b2-nodocs.tar.gz")
add_urls("https://github.com/boostorg/boost/releases/download/boost-$(version)/boost-$(version).tar.gz")
add_urls("https://github.com/xmake-mirror/boost/releases/download/boost-$(version).tar.bz2", {alias = "mirror", version = function (version)
return version .. "/boost_" .. (version:gsub("%.", "_"))
end})
add_versions("1.85.0", "f4a7d3f81b8a0f65067b769ea84135fd7b72896f4f59c7f405086c8c0dc61434")
add_versions("1.84.0", "4d27e9efed0f6f152dc28db6430b9d3dfb40c0345da7342eaa5a987dde57bd95")
add_versions("1.83.0", "0c6049764e80aa32754acd7d4f179fd5551d8172a83b71532ae093e7384e98da")
add_versions("1.82.0", "b62bd839ea6c28265af9a1f68393eda37fab3611425d3b28882d8e424535ec9d")
@ -170,8 +172,14 @@ package("boost")
return format("using %s : %s : \"%s\" ;", win_toolset, msvc_ver, cxx:gsub("\\", "\\\\"))
else
cxx = cxx:gsub("gcc$", "g++")
cxx = cxx:gsub("gcc%-", "g++-")
cxx = cxx:gsub("clang$", "clang++")
return format("using gcc : : \"%s\" ;", cxx:gsub("\\", "/"))
cxx = cxx:gsub("clang%-", "clang++-")
if cxx and cxx:find("clang", 1, true) then
return format("using clang : : \"%s\" ;", cxx:gsub("\\", "/"))
else
return format("using gcc : : \"%s\" ;", cxx:gsub("\\", "/"))
end
end
end

Loading…
Cancel
Save