mirror of
https://github.com/XRPLF/rippled.git
synced 2026-10-28 14:37:31 +00:00
Make grpc a build requirement too
This commit is contained in:
4 files changed
+24
-12
No files matched your search
@@ -34,11 +34,15 @@
|
||||
"build_requires": [
|
||||
"zlib/1.3.2#1cb806da49011867778ffb6ac7190fcb%1782392402.122708",
|
||||
"strawberryperl/5.32.1.1#8d114504d172cfea8ea1662d09b6333e%1782395692.540639",
|
||||
"re2/20251105#8579cfd0bda4daf0683f9e3898f964b4%1782392402.431897",
|
||||
"protobuf/6.33.5#ff253ead763bd8d9904a52979cd21e81%1782392410.233933",
|
||||
"openssl/3.6.3#f806de8933e3bf6f01016c6a888cee2e%1783945160.863288",
|
||||
"nasm/2.16.01#31e26f2ee3c4346ecd347911bd126904%1782395690.33162",
|
||||
"msys2/cci.latest#d22fe7b2808f5fd34d0a7923ace9c54f%1770657326.649",
|
||||
"m4/1.4.19#1727f439cf74e83826ec96d0b4904eee%1784541921.659",
|
||||
"grpc/1.81.1#b87796a4269034856cbc1a2522db16eb%1788275071.530512",
|
||||
"cmake/4.3.3#840cf00ea09777e05c2050a50a82c722%1782392418.696091",
|
||||
"c-ares/1.34.6#545240bb1c40e2cacd4362d6b8967650%1782392402.681654",
|
||||
"b2/5.4.2#ffd6084a119587e70f11cd45d1a386e2%1782392402.624226",
|
||||
"automake/1.16.5#b91b7c384c3deaa9d535be02da14d04f%1755524470.56",
|
||||
"autoconf/2.71#51077f068e61700d65bb05541ea1e4b0%1731054366.86",
|
||||
|
||||
@@ -49,17 +49,13 @@ tools.build:compiler_executables={'c':'{{ cc_exe }}','cpp':'{{ cxx_exe }}'}
|
||||
user.package:cppstd_version=23
|
||||
tools.info.package_id:confs+=["user.package:cppstd_version"]
|
||||
|
||||
{% if os == "Linux" %}
|
||||
{# Executables we run (protoc, grpc_cpp_plugin, build tools) would otherwise load libstdc++/libgcc #}
|
||||
{# from a Nix store path that might change with a Nix toolchain update. #}
|
||||
{% if os == "Linux" and context == "build" %}
|
||||
{# Build-context executables (protoc, grpc_cpp_plugin, build tools) run during the build #}
|
||||
{# and would otherwise load libstdc++/libgcc from a Nix store path #}
|
||||
{# that might change with a Nix toolchain update. #}
|
||||
{# --as-needed drops the ones they link but don't use, #}
|
||||
{# such as libatomic for grpc_cpp_plugin on arm64. #}
|
||||
{% set exe_link_flags = ["-static-libstdc++", "-static-libgcc", "-Wl,--as-needed"] %}
|
||||
{% if context == "build" %}
|
||||
tools.build:exelinkflags+={{ exe_link_flags }}
|
||||
{% else %}
|
||||
grpc/*:tools.build:exelinkflags+={{ exe_link_flags }}
|
||||
{% endif %}
|
||||
tools.build:exelinkflags+=["-static-libstdc++", "-static-libgcc", "-Wl,--as-needed"]
|
||||
tools.info.package_id:confs+=["tools.build:exelinkflags"]
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -148,6 +148,18 @@ class Xrpl(ConanFile):
|
||||
self.requires("sqlite3/3.53.0", force=True)
|
||||
self.requires("xxhash/0.8.3", transitive_headers=True)
|
||||
|
||||
def build_requirements(self):
|
||||
# grpc_cpp_plugin runs during the build, so take it from the build context.
|
||||
# default_options only reach the host context, so pass grpc's on explicitly.
|
||||
self.tool_requires(
|
||||
"grpc/1.81.1",
|
||||
options={
|
||||
key.removeprefix("grpc/*:"): value
|
||||
for key, value in self.default_options.items()
|
||||
if key.startswith("grpc/*:")
|
||||
},
|
||||
)
|
||||
|
||||
exports_sources = (
|
||||
"bin/default-loader-path.sh",
|
||||
"CMakeLists.txt",
|
||||
|
||||
Vendored
+3
-3
@@ -197,10 +197,10 @@ It works on Linux too, but asserts something narrower there: the toolchain alway
|
||||
writes the store into `PT_INTERP` and `RUNPATH`. That is fine for the pinned
|
||||
glibc, whose path does not move, but not for the GCC runtime, which moves with
|
||||
every GCC update. So [`conan/profiles/default`](../../conan/profiles/default)
|
||||
links the executables that run during the build (build-context packages and
|
||||
`grpc_cpp_plugin`) with `-static-libstdc++ -static-libgcc -Wl,--as-needed`, and
|
||||
links build-context packages, whose executables run during the build, with
|
||||
`-static-libstdc++ -static-libgcc -Wl,--as-needed`, and
|
||||
[`conan/profiles/sanitizers`](../../conan/profiles/sanitizers) does not
|
||||
instrument build-context packages. Only the binaries
|
||||
instrument them. Only the binaries
|
||||
[`PatchNixBinary.cmake`](../../cmake/PatchNixBinary.cmake) retargets to the
|
||||
system loader have to be clean, and those are what CI checks:
|
||||
|
||||
|
||||
Reference in new issue
Block a user