Skip to content

Commit

Permalink
bazel: is_dev_linux config setting should be false when cross_flag is
Browse files Browse the repository at this point in the history
true

When cross-compiling on a gce worker and invoking bazel directly, build
fails with "cannot find -lresolv_wrapper", owing to the fact that
is_dev_linux is not mutually exclusive of cross_linux. That is, when
both configs are active "-lresolv_wrapper" is passed to clinkopts in
pkg/ccl/gssapiccl/BUILD.bazel; the cross-compiler doesn't have this lib nor
does it need it.

Note, when using ./dev instead of bazel, the above issue is side-stepped
because the dev wrapper invokes bazel inside docker which ignores
~/.bazelrc.

The workaround is to make is_dev_linux false when cross_flag is true.

Epic: none

Release note: None
  • Loading branch information
srosenberg committed Jan 28, 2023
1 parent 1236bc3 commit 53c3df3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions build/toolchains/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ config_setting(
],
flag_values = {
":dev_flag": "true",
":cross_flag": "false",
},
)

Expand Down

0 comments on commit 53c3df3

Please sign in to comment.