Skip to content

[Feature Request] Explicit clang modules #1475

Open
@yongjincho92

Description

@yongjincho92

Context

Explicit module for swift helps with build speed by reducing the duplicated pcm file generation (via compilation). Implicit clang modules are used for Swift / Obj-C interop most commonly.

Build speed improvement comes from 1) not having to generate duplicate pcm files and 2) pcm files become explicit outputs of bazel compile actions making Bazel's action scheduling more efficient.

In Snapchat, we used to use clang modules for all objective-c library targets by default for Swift inter-op. But we realized the overhead from implicit clang modules, and changed to creating clang modules only when objective-c library is depended on by swift target. As a result, we were able to see ~50% improvement in clean full application build time (~40 --> ~20min).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions