forked from ghc/ghc
-
Notifications
You must be signed in to change notification settings - Fork 1
aggregated #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
angerman
wants to merge
3
commits into
tmp/iog-dist-offset
from
wip/angerman/multi-target-aggregated
Closed
aggregated #40
angerman
wants to merge
3
commits into
tmp/iog-dist-offset
from
wip/angerman/multi-target-aggregated
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This should now be up to date with the wip/multi-target-support branch. Squashed down a little. |
This commit introduces a comprehensive cabal-based build infrastructure to support multi-target and cross-compilation scenarios for GHC. The new build system provides a clean separation between different build stages and better modularity for toolchain components. Key changes: - Add Makefile with stage1, stage2, and stage3 build targets - Create separate cabal.project files for each build stage - Update configure.ac for new build system requirements - Adapt hie.yaml to support cabal-based builds - Update GitHub CI workflow for new build process Build stages explained: - Stage 1: Bootstrap compiler built with system GHC - Stage 2: Intermediate compiler built with Stage 1 - Stage 3: Final compiler built with Stage 2 (for validation) This modular approach enables: - Clean cross-compilation support - Better dependency management - Simplified build process for different targets - Improved build reproducibility Contributors: - Andrea Bedini: Build system design and Makefile implementation - Moritz Angermann: Cross-compilation infrastructure The new build system maintains compatibility with existing workflows while providing a more maintainable foundation for future enhancements.
This commit restructures the Runtime System (RTS) components for better modularity and reusability across different build configurations. The changes enable cleaner separation of concerns and improved support for cross-compilation scenarios. Key changes: - Extract RTS headers into standalone rts-headers package * Moved include/rts/Bytecodes.h to rts-headers * Moved include/rts/storage/ClosureTypes.h to rts-headers * Moved include/rts/storage/FunTypes.h to rts-headers * Moved include/stg/MachRegs/* to rts-headers - Create rts-fs package for filesystem utilities * Extracted filesystem code from utils/fs * Provides reusable filesystem operations for RTS - Rename utils/iserv to utils/ghc-iserv for consistency * Better naming alignment with other GHC utilities * Updated all references throughout the codebase - Update RTS configuration and build files * Modified rts/configure.ac for new structure * Updated rts.cabal with new dependencies * Adjusted .gitignore for new artifacts Rationale: The modularization allows different stages of the compiler build to share common RTS components without circular dependencies. This is particularly important for: - Cross-compilation where host and target RTS differ - JavaScript backend which needs selective RTS components - Stage1/Stage2 builds that require different RTS configurations Contributors: - Moritz Angermann: RTS modularization architecture and implementation - Sylvain Henry: JavaScript backend RTS adjustments - Andrea Bedini: Build system integration This refactoring maintains full backward compatibility while providing a cleaner foundation for multi-target support.
This commit completes the multi-target support infrastructure with comprehensive changes across the compiler, build system, and runtime components. These changes enable GHC to efficiently target multiple platforms including native, JavaScript, and cross-compilation scenarios. Core Compiler Changes: - GHC.Driver.DynFlags: Multi-target configuration support - GHC.Driver.Session: Enhanced session management for targets - GHC.Driver.Make: Updated build orchestration for stages - GHC.Driver.Downsweep: Improved module dependency handling - GHC.ByteCode.Asm: Cross-platform bytecode assembly - GHC.Iface.Load: Added Hooks parameter for interface loading - GHC.Unit.State: Multi-target package database handling LLVM Integration: - GHC.CmmToLlvm.*: Refactored LLVM backend configuration - Removed Version/Bounds.hs.in template - Dynamic LLVM version detection - Improved LLVM toolchain integration JavaScript Backend: - GHC.Driver.Config.StgToJS: JavaScript code generation config - Enhanced JavaScript runtime support - Integration with multi-stage build system Linker and Code Generation: - GHC.Linker.Dynamic: Cross-platform dynamic linking - GHC.Linker.Static: Static linking improvements - GHC.Linker.ExtraObj: Object file handling - GHC.Driver.CodeOutput: Multi-target code emission - CodeGen.Platform.h: Platform-specific code generation Build System: - ghc-pkg: Added --target flag support - deriveConstants: Cross-compilation aware - genprimopcode: Target-specific primop generation - Setup.hs files: Updated for new build infrastructure - packages: Updated submodule references Libraries: - system-cxx-std-lib: New C++ standard library wrapper - ghc-internal: Updated configuration - ghc-boot: Build system adjustments - ghc-prim: Cross-compilation support Testing Infrastructure: - Updated test driver for multi-target scenarios - Fixed platform-specific tests - Adjusted test expectations for new architecture - Added T10279h.hs test helper External Dependencies: - Removed libffi-tarballs (using system packages) - Updated Cabal submodule - Updated hsc2hs for cross-compilation Utilities: - unlit: Cross-platform compatibility - ghc-toolchain: Target detection improvements - config.guess/config.sub: GNU config files for RTS - Added .envrc for development environment - Added configure script for build configuration Contributors: - Moritz Angermann: Multi-target architecture and cross-compilation - Sylvain Henry: JavaScript backend integration - Andrea Bedini: Build system improvements - Julian Ospald: Testing infrastructure and utilities This completes the foundational work for GHC's multi-target support, enabling efficient compilation for diverse platforms while maintaining backward compatibility and build reproducibility.
13b69bc
to
4223669
Compare
This is now part of #42 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.