a52b20cc35
* remove docker build cruft - Simplified environment variable sourcing in build scripts by using a single build-env.sh file. - Updated Dockerfile to streamline the build process and reduce unnecessary comments. - Enhanced setup-cross-compilation.sh to directly set target and linker variables without temporary files. - Improved clarity and maintainability of build scripts. * fix setup-cross-compilation.sh - Updated the script to use a more concise syntax for exporting environment variables. - Improved readability by using echo and conditional checks for BINDGEN_EXTRA_CLANG_ARGS. - This change simplifies the script while maintaining functionality. * Refactor setup-cross-compilation.sh for improved readability - Changed the syntax for checking BINDGEN_EXTRA_CLANG_ARGS to use a conditional statement for clarity. - This enhances the script's maintainability while preserving its functionality.
Docker Build Scripts
This directory contains scripts used by the Dockerfile to build SQLPage with cross-compilation support.
Scripts
setup-cross-compilation.sh: Sets up the cross-compilation environment based on target and build architectures. Handles system dependencies, cross-compiler installation, and libgcc extraction for runtime.build-dependencies.sh: Builds only the project dependencies for Docker layer cachingbuild-project.sh: Builds the final SQLPage binary
Usage
These scripts are automatically copied and executed by the Dockerfile during the build process. They handle:
- Cross-compilation setup for different architectures (amd64, arm64, arm)
- System dependencies installation
- Cargo build configuration with appropriate linkers
- Library extraction for runtime
The scripts use temporary files in /tmp/ to pass configuration between stages and export environment variables for use in subsequent build steps.