mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-27 22:15:49 +00:00
refactor: replace HBB env var with conan options
Replace HBB_RELEASE_BUILD environment variable with explicit Conan options to decouple conanfile.py from specific build environments. - Add 'with_wasmedge' and 'tool_requires_b2' options to conanfile.py - Remove HBB_RELEASE_BUILD env var check from conanfile.py - Pass options explicitly in build-core.sh: -o with_wasmedge=False -o tool_requires_b2=True - Remove HBB_RELEASE_BUILD=1 export from build-full.sh - Clean up HBB-specific commentary (already documented in release-builder.sh)
This commit is contained in:
@@ -59,7 +59,8 @@ cd release-build &&
|
||||
# The tool_requires('b2/5.3.2') in conanfile.py should force b2 to build from source
|
||||
# with the correct toolchain, avoiding the GLIBCXX_3.4.29 issue
|
||||
echo "=== Installing dependencies ===" &&
|
||||
conan install .. --output-folder . --build missing --settings build_type=$BUILD_TYPE &&
|
||||
conan install .. --output-folder . --build missing --settings build_type=$BUILD_TYPE \
|
||||
-o with_wasmedge=False -o tool_requires_b2=True &&
|
||||
cmake .. -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
||||
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
|
||||
|
||||
@@ -69,7 +69,6 @@ source /opt/rh/gcc-toolset-11/enable
|
||||
export PATH=/usr/local/bin:$PATH
|
||||
export CC='ccache gcc' &&
|
||||
export CXX='ccache g++' &&
|
||||
export HBB_RELEASE_BUILD=1 &&
|
||||
echo "-- Build Rippled --" &&
|
||||
pwd &&
|
||||
|
||||
|
||||
27
conanfile.py
27
conanfile.py
@@ -21,13 +21,10 @@ class Xrpl(ConanFile):
|
||||
'static': [True, False],
|
||||
'tests': [True, False],
|
||||
'unity': [True, False],
|
||||
'with_wasmedge': [True, False],
|
||||
'tool_requires_b2': [True, False],
|
||||
}
|
||||
|
||||
import os
|
||||
|
||||
# Check if we're in HBB release build environment
|
||||
IS_HBB_BUILD = os.getenv('HBB_RELEASE_BUILD') == '1'
|
||||
|
||||
requires = [
|
||||
'date/3.0.1',
|
||||
'libarchive/3.6.0',
|
||||
@@ -40,10 +37,6 @@ class Xrpl(ConanFile):
|
||||
'zlib/1.3.1',
|
||||
]
|
||||
|
||||
# Only include deps that aren't manually installed in HBB
|
||||
if not IS_HBB_BUILD:
|
||||
requires.append('wasmedge/0.11.2@xahaud/stable')
|
||||
|
||||
default_options = {
|
||||
'assertions': False,
|
||||
'coverage': False,
|
||||
@@ -55,6 +48,8 @@ class Xrpl(ConanFile):
|
||||
'static': True,
|
||||
'tests': True,
|
||||
'unity': False,
|
||||
'with_wasmedge': True,
|
||||
'tool_requires_b2': False,
|
||||
|
||||
'cassandra-cpp-driver/*:shared': False,
|
||||
'date/*:header_only': True,
|
||||
@@ -105,8 +100,8 @@ class Xrpl(ConanFile):
|
||||
# These provide build tools (protoc, grpc plugins) that run during build
|
||||
self.tool_requires('protobuf/3.21.12')
|
||||
self.tool_requires('grpc/1.50.1')
|
||||
# Force b2 to build from source for glibc compatibility in HBB builds
|
||||
if self.IS_HBB_BUILD:
|
||||
# Explicitly require b2 (e.g. for building from source for glibc compatibility)
|
||||
if self.options.tool_requires_b2:
|
||||
self.tool_requires('b2/5.3.2')
|
||||
|
||||
def configure(self):
|
||||
@@ -118,17 +113,11 @@ class Xrpl(ConanFile):
|
||||
self.requires('sqlite3/3.42.0', override=True)
|
||||
# Force our custom snappy build for all dependencies
|
||||
self.requires('snappy/1.1.10@xahaud/stable', override=True)
|
||||
|
||||
# Force boost version for all dependencies to avoid conflicts
|
||||
# NOTE: HBB builds have both manual boost (for WasmEdge) and Conan boost because:
|
||||
# - WasmEdge is manually built and linked against minimal system boost (filesystem + system)
|
||||
# - The application itself requires boost (chrono, coroutine, thread, etc.)
|
||||
# - Dependencies like nudb/soci also require boost components
|
||||
# - The application and deps use Conan's boost (via CMake toolchain)
|
||||
# - Both are boost 1.86.0, so symbols are identical (no version conflicts)
|
||||
# - Static linking means symbols are resolved at link time, not runtime
|
||||
self.requires('boost/1.86.0', override=True)
|
||||
|
||||
if self.options.with_wasmedge:
|
||||
self.requires('wasmedge/0.11.2@xahaud/stable')
|
||||
if self.options.jemalloc:
|
||||
self.requires('jemalloc/5.2.1')
|
||||
if self.options.reporting:
|
||||
|
||||
Reference in New Issue
Block a user