summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2024-04-08 07:45:41 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-04-08 07:45:41 +0000
commit1bcd0008b573931ed23b8b6619ed15f25aaf572d (patch)
treedbae4cadf5724c6fe20efd18215628e2e0787dd7
parentf9133cdaf7b3584eb69f1c0e9ec11b352170067e (diff)
parentde979840b967c8e3af9445dc4536093e4dd3af50 (diff)
downloaddevelopment-1bcd0008b573931ed23b8b6619ed15f25aaf572d.tar.gz
Merge "cargo2rulesmk.py: Build with cap-lints allow" into main
-rwxr-xr-xscripts/cargo2rulesmk.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/cargo2rulesmk.py b/scripts/cargo2rulesmk.py
index 7e0e33881..722484983 100755
--- a/scripts/cargo2rulesmk.py
+++ b/scripts/cargo2rulesmk.py
@@ -870,8 +870,11 @@ class Runner(object):
cmd_v_flag = " -vv " if self.args.vv else " -v "
cmd = self.cargo_path + cmd_v_flag
cmd += c + features + cmd_tail_target + cmd_tail_redir
- if self.args.rustflags and c != "clean":
- cmd = 'RUSTFLAGS="' + self.args.rustflags + '" ' + cmd
+ if c != "clean":
+ rustflags = self.args.rustflags if self.args.rustflags else ""
+ # linting issues shouldn't prevent us from generating rules.mk
+ rustflags = f'RUSTFLAGS="{rustflags} --cap-lints allow" '
+ cmd = rustflags + cmd
self.run_cmd(cmd, cargo_out)
if self.args.tests:
cmd = (