diff options
| author | Martin Ridgers <[email protected]> | 2021-11-12 14:42:31 +0100 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-11-15 09:08:18 +0100 |
| commit | b56667f06a634f58dc67e69e5c5d3f587f0b8578 (patch) | |
| tree | 9df901731b7c11ec493efbbbb325b3b9d36b155f | |
| parent | Wrapped "upstream apply" in ZEN_WITH_COMPUTE_SERVICES (diff) | |
| download | zen-b56667f06a634f58dc67e69e5c5d3f587f0b8578.tar.xz zen-b56667f06a634f58dc67e69e5c5d3f587f0b8578.zip | |
Fixed OpenSSL link errors (xmake-related, see comment)
| -rw-r--r-- | zencore/xmake.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/zencore/xmake.lua b/zencore/xmake.lua index 646d8dbd5..5923b99c3 100644 --- a/zencore/xmake.lua +++ b/zencore/xmake.lua @@ -26,3 +26,18 @@ target('zencore') "vcpkg::openssl", -- required by curl "vcpkg::xxhash", "vcpkg::gsl-lite") + + if is_plat("linux") then + -- The 'vcpkg::openssl' package is two libraries; ssl and crypto, with + -- ssl being dependent on symbols in crypto. When GCC-like linkers read + -- object files from their command line, those object files only resolve + -- symbols of objects previously encountered. Thus crypto must appear + -- after ssl so it can fill out ssl's unresolved symbol table. Xmake's + -- vcpkg support is basic and works by parsing .list files. Openssl's + -- archives are listed alphabetically causing crypto to be _before_ ssl + -- and resulting in link errors. The links are restated here to force + -- xmake to use the correct order, and "syslinks" is used to force the + -- arguments to the end of the line (otherwise they can appear before + -- curl and cause more errors). + add_syslinks("ssl", "crypto") + end |