Skip to content
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

Use prebuilt protoc toolchain #139

Merged

Commits on Aug 21, 2024

  1. Use prebuilt protoc toolchain

    This downloads a prebuilt protoc binary and uses that through regular
    toolchain resolution (with the incompatible flag). This increases build
    speed and removes the many compiler warnings that pop-up during
    compilation of protoc sources. And more importantly works better on
    Windows. Where for some reason the protoc compilation fails from an
    external module:
    
        gits/bb-deployments $ bazel build \
            --override_module protobuf=../protobuf \
            @protobuf//src/google/protobuf:timestamp_proto
        ERROR: C:/tmp/eprbnvuo/external/protobuf~/src/google/protobuf/compiler/java/BUILD.bazel:99:11: Compiling src/google/protobuf/compiler/java/context.cc [for tool] failed: undeclared inclusion(s) in rule '@@protobuf~//src/google/protobuf/compiler/java:java':
        this rule is missing dependency declarations for the following files included by 'src/google/protobuf/compiler/java/context.cc':
          'bazel-out/x64_windows-opt-exec-ST-d57f47055a04/bin/external/protobuf~/src/google/protobuf/compiler/java/_virtual_includes/java/google/protobuf/compiler/java/context.h'
    
    Whereas it does work when building from its own checkout:
    
        ~/gits/protobuf $ bazel build \
            //src/google/protobuf:timestamp_proto
        Target //src/google/protobuf:timestamp_proto up-to-date:
          bazel-bin/src/google/protobuf/timestamp_proto-descriptor-set.proto.bin
        INFO: Build completed successfully, 1 total action
    stagnation committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    e94dda4 View commit details
    Browse the repository at this point in the history