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

dev: various improvements to --cross compilation #76320

Merged
merged 1 commit into from
Feb 11, 2022

Conversation

rickystewart
Copy link
Collaborator

  1. We bind-mount an empty file over .bazelrc.user so that user
    configuration doesn't interfere with or break cross builds.
  2. Add a new whereis executable. It's basically just realpath except
    portable.
  3. Update how dev cache finds the location of the bazel-remote
    binary: now we use bazel run --run_under=whereis, which doesn't
    require doing any funny stuff with cquery.
  4. Allow cross-building cmake and go_test targets, using realpath
    to find where test and binary targets are placed.

Closes #76094.
Closes #76260.

Release note: None

@rickystewart rickystewart requested a review from rail February 9, 2022 18:43
@rickystewart rickystewart requested a review from a team as a code owner February 9, 2022 18:43
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rickystewart
Copy link
Collaborator Author

Whoops, forgot to update the tests, that's my bad.

Copy link
Member

@rail rail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 11 of 11 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @rickystewart)

1. We bind-mount an empty file over `.bazelrc.user` so that user
   configuration doesn't interfere with or break cross builds.
2. Add a new `whereis` executable. It's basically just `realpath` except
   portable.
3. Update how `dev cache` finds the location of the `bazel-remote`
   binary: now we use `bazel run --run_under=whereis`, which doesn't
   require doing any funny stuff with `cquery`.
4. Allow cross-building `cmake` and `go_test` targets, using `realpath`
   to find where test and binary targets are placed.

Closes cockroachdb#76094.
Closes cockroachdb#76260.

Release note: None
@rickystewart
Copy link
Collaborator Author

bors r=rail

@craig
Copy link
Contributor

craig bot commented Feb 11, 2022

Build succeeded:

@craig craig bot merged commit 657c0e1 into cockroachdb:master Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants