Skip to content

Fix launcher/launcher_maker for cross build#29200

Closed
BoleynSu wants to merge 1 commit intobazelbuild:masterfrom
BoleynSu:launcher
Closed

Fix launcher/launcher_maker for cross build#29200
BoleynSu wants to merge 1 commit intobazelbuild:masterfrom
BoleynSu:launcher

Conversation

@BoleynSu
Copy link
Copy Markdown
Contributor

@BoleynSu BoleynSu commented Apr 2, 2026

Description

Fix launcher/launcher_maker for cross build. launcher will be used in the build output, so it should use cfg=target. launcher_maker is used to combine a binary for target and launcher for target into the final output at build time, so it should use cfg=exec.

Motivation

To make py_binary launcher work when building on linux (exec) for windows (target).

Build API Changes

No

Checklist

  • I have added tests for the new use cases (if any).
  • I have updated the documentation (if applicable).

Release Notes

RELNOTES: Fix launcher/launcher_maker for cross build, e.g. build windows binary on linux machine.

@BoleynSu
Copy link
Copy Markdown
Contributor Author

BoleynSu commented Apr 2, 2026

cc @fmeum

@github-actions github-actions Bot added the awaiting-review PR is awaiting review from an assigned reviewer label Apr 2, 2026
@fmeum
Copy link
Copy Markdown
Collaborator

fmeum commented Apr 2, 2026

Could you explain the situation in which this fixes your build?

@fmeum
Copy link
Copy Markdown
Collaborator

fmeum commented Apr 2, 2026

Ah, I get it. Thanks for catching this! Looks good to me, but please flesh out the PR description.

@fmeum
Copy link
Copy Markdown
Collaborator

fmeum commented Apr 2, 2026

@meteorcloudy

@fmeum
Copy link
Copy Markdown
Collaborator

fmeum commented Apr 2, 2026

@bazel-io fork 9.1.0

@fmeum
Copy link
Copy Markdown
Collaborator

fmeum commented Apr 2, 2026

@bazel-io fork 9.0.2

@fmeum
Copy link
Copy Markdown
Collaborator

fmeum commented Apr 2, 2026

@bazel-io fork 8.7.0

@BoleynSu
Copy link
Copy Markdown
Contributor Author

BoleynSu commented Apr 2, 2026

Description updated

@fmeum fmeum requested a review from meteorcloudy April 2, 2026 20:06
@iancha1992 iancha1992 requested a review from Wyverald April 3, 2026 17:14
@iancha1992 iancha1992 added the team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. label Apr 3, 2026
@Wyverald Wyverald added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Apr 3, 2026
@copybara-service copybara-service Bot closed this in 4ff3127 Apr 7, 2026
@github-actions github-actions Bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Apr 7, 2026
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Apr 7, 2026
### Description

Fix launcher/launcher_maker for cross build. launcher will be used in the build output, so it should use cfg=target. launcher_maker is used to combine a binary for target and launcher for target into the final output at build time, so it should use cfg=exec.

### Motivation

To make py_binary launcher work when building on linux (exec) for windows (target).

### Build API Changes

No

### Checklist

- [ ] I have added tests for the new use cases (if any).
- [ ] I have updated the documentation (if applicable).

### Release Notes

RELNOTES: Fix launcher/launcher_maker for cross build, e.g. build windows binary on linux machine.

Closes bazelbuild#29200.

PiperOrigin-RevId: 895761405
Change-Id: I0b3dd3431d25fb4fb9ea827f344eb5cf42c11276
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Apr 7, 2026
### Description

Fix launcher/launcher_maker for cross build. launcher will be used in the build output, so it should use cfg=target. launcher_maker is used to combine a binary for target and launcher for target into the final output at build time, so it should use cfg=exec.

### Motivation

To make py_binary launcher work when building on linux (exec) for windows (target).

### Build API Changes

No

### Checklist

- [ ] I have added tests for the new use cases (if any).
- [ ] I have updated the documentation (if applicable).

### Release Notes

RELNOTES: Fix launcher/launcher_maker for cross build, e.g. build windows binary on linux machine.

Closes bazelbuild#29200.

PiperOrigin-RevId: 895761405
Change-Id: I0b3dd3431d25fb4fb9ea827f344eb5cf42c11276
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Apr 7, 2026
### Description

Fix launcher/launcher_maker for cross build. launcher will be used in the build output, so it should use cfg=target. launcher_maker is used to combine a binary for target and launcher for target into the final output at build time, so it should use cfg=exec.

### Motivation

To make py_binary launcher work when building on linux (exec) for windows (target).

### Build API Changes

No

### Checklist

- [ ] I have added tests for the new use cases (if any).
- [ ] I have updated the documentation (if applicable).

### Release Notes

RELNOTES: Fix launcher/launcher_maker for cross build, e.g. build windows binary on linux machine.

Closes bazelbuild#29200.

PiperOrigin-RevId: 895761405
Change-Id: I0b3dd3431d25fb4fb9ea827f344eb5cf42c11276
github-merge-queue Bot pushed a commit that referenced this pull request Apr 7, 2026
### Description

Fix launcher/launcher_maker for cross build. launcher will be used in
the build output, so it should use cfg=target. launcher_maker is used to
combine a binary for target and launcher for target into the final
output at build time, so it should use cfg=exec.

### Motivation

To make py_binary launcher work when building on linux (exec) for
windows (target).

### Build API Changes

No

### Checklist

- [ ] I have added tests for the new use cases (if any).
- [ ] I have updated the documentation (if applicable).

### Release Notes

RELNOTES: Fix launcher/launcher_maker for cross build, e.g. build
windows binary on linux machine.

Closes #29200.

PiperOrigin-RevId: 895761405
Change-Id: I0b3dd3431d25fb4fb9ea827f344eb5cf42c11276

Commit
4ff3127

Co-authored-by: Boleyn Su <[email protected]>
github-merge-queue Bot pushed a commit that referenced this pull request Apr 8, 2026
### Description

Fix launcher/launcher_maker for cross build. launcher will be used in
the build output, so it should use cfg=target. launcher_maker is used to
combine a binary for target and launcher for target into the final
output at build time, so it should use cfg=exec.

### Motivation

To make py_binary launcher work when building on linux (exec) for
windows (target).

### Build API Changes

No

### Checklist

- [ ] I have added tests for the new use cases (if any).
- [ ] I have updated the documentation (if applicable).

### Release Notes

RELNOTES: Fix launcher/launcher_maker for cross build, e.g. build
windows binary on linux machine.

Closes #29200.

PiperOrigin-RevId: 895761405
Change-Id: I0b3dd3431d25fb4fb9ea827f344eb5cf42c11276

Commit
4ff3127

Co-authored-by: Boleyn Su <[email protected]>
github-merge-queue Bot pushed a commit that referenced this pull request Apr 8, 2026
### Description

Fix launcher/launcher_maker for cross build. launcher will be used in
the build output, so it should use cfg=target. launcher_maker is used to
combine a binary for target and launcher for target into the final
output at build time, so it should use cfg=exec.

### Motivation

To make py_binary launcher work when building on linux (exec) for
windows (target).

### Build API Changes

No

### Checklist

- [ ] I have added tests for the new use cases (if any).
- [ ] I have updated the documentation (if applicable).

### Release Notes

RELNOTES: Fix launcher/launcher_maker for cross build, e.g. build
windows binary on linux machine.

Closes #29200.

PiperOrigin-RevId: 895761405
Change-Id: I0b3dd3431d25fb4fb9ea827f344eb5cf42c11276

Commit
4ff3127

Co-authored-by: Boleyn Su <[email protected]>
@iancha1992
Copy link
Copy Markdown
Member

A fix for this issue has been included in Bazel 9.1.0 RC1. Please test out the release candidate and report any issues as soon as possible.
If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=9.1.0rc1. Thanks!

@BoleynSu
Copy link
Copy Markdown
Contributor Author

BoleynSu commented Apr 15, 2026

I can confirm the issue fixed in 9.1.0rc2. bazel build now works but bazel test still need some love (which is unrelated to launcher).

sfc-gh-jkuster pushed a commit to Snowflake-Labs/bazel that referenced this pull request Apr 23, 2026
### Description

Fix launcher/launcher_maker for cross build. launcher will be used in the build output, so it should use cfg=target. launcher_maker is used to combine a binary for target and launcher for target into the final output at build time, so it should use cfg=exec.

### Motivation

To make py_binary launcher work when building on linux (exec) for windows (target).

### Build API Changes

No

### Checklist

- [ ] I have added tests for the new use cases (if any).
- [ ] I have updated the documentation (if applicable).

### Release Notes

RELNOTES: Fix launcher/launcher_maker for cross build, e.g. build windows binary on linux machine.

Closes bazelbuild#29200.

PiperOrigin-RevId: 895761405
Change-Id: I0b3dd3431d25fb4fb9ea827f344eb5cf42c11276
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants