Skip to content

S-CORE Bazel Platform Definitions #23

@nradakovic

Description

@nradakovic

Description

To ensure consistent and maintainable Bazel builds across all S-CORE modules, we need a centralized repository that defines and publishes all platform configurations required by modules. This effort will unify platform definitions (e.g., CPU architecture, OS, constraints, execution platforms, toolchains) in a versioned, shareable Bazel module.

Each consumer module will be able to pull these platform definitions as a dependency via Bzlmod (MODULE.bazel) minimizing duplication and divergence across projects.

This Epic covers the creation, structure, initial content, integration approach, and usage documentation of this new Bazel platform definition module.

Scope

  • Create a standalone Git repository (e.g., s-core-bazel-platforms)
  • Define reusable Bazel platform() and constraint_setting()/constraint_value() targets
  • Include common platforms:
    • Linux (x86_64, aarch64)
    • Windows
    • macOS
    • Android (device + emulator targets)
    • Embedded (placeholder for future extensions)
  • Provide Bzlmod-compatible module structure
  • Add documentation and example usages
  • Enable automatic testing of platform definitions via GitHub Actions

Acceptance Criteria

  • A public or internal Git repository exists named bazel-platforms.

  • Repository contains a valid MODULE.bazel file for Bzlmod compatibility

  • Repository defines at least the following Bazel platforms:

    • linux_x86_64
    • linux_aarch64
    • windows_x86_64
    • macos_x86_64
    • android_arm64
  • Constraints are defined and reusable (e.g., cpu, os, compiler_version)

  • Example Bazel module demonstrates how to consume these definitions

  • Documentation includes:

    • Integration steps for Bzlmod
    • Guidelines for requesting new platforms
    • Versioning and release instructions
  • CI is in place to lint platform definitions via Buildifier

  • At least one real module uses this platform repository successfully

Definition of Done

  • The centralized Bazel platform definitions module is available in a Git repository
  • The repository defines and exports at least 5 major base platforms
  • Platforms can be consumed via bazel_dep()
  • Example usage is documented and tested
  • Internal consumers are aware of and able to start using the module
  • Ownership and maintenance responsibilities are clearly documented (e.g., CODEOWNERS or README)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestquestionFurther information is requested

Type

No fields configured for Epic.

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions