From 53c3df3efc29336a49fff660738ff03aa8e231cf Mon Sep 17 00:00:00 2001 From: Stan Rosenberg Date: Sat, 28 Jan 2023 01:43:02 +0000 Subject: [PATCH] bazel: is_dev_linux config setting should be false when cross_flag is 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 --- build/toolchains/BUILD.bazel | 1 + 1 file changed, 1 insertion(+) diff --git a/build/toolchains/BUILD.bazel b/build/toolchains/BUILD.bazel index 0d6130d58c6c..36f2451d8947 100644 --- a/build/toolchains/BUILD.bazel +++ b/build/toolchains/BUILD.bazel @@ -346,6 +346,7 @@ config_setting( ], flag_values = { ":dev_flag": "true", + ":cross_flag": "false", }, )