[PATCH] D133604: [gn build] port a3172df59c32 (check-lldb)
Zequan Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 12 11:22:51 PDT 2022
zequanwu updated this revision to Diff 459526.
zequanwu added a comment.
Use an action to write file.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133604/new/
https://reviews.llvm.org/D133604
Files:
llvm/utils/gn/build/write_file.py
llvm/utils/gn/secondary/lldb/test/BUILD.gn
Index: llvm/utils/gn/secondary/lldb/test/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/lldb/test/BUILD.gn
+++ llvm/utils/gn/secondary/lldb/test/BUILD.gn
@@ -134,6 +134,17 @@
extra_values = [ "LLVM_BUILD_MODE=." ]
}
+action("lit-lldb-init-quiet") {
+ script = "//llvm/utils/gn/build/write_file.py"
+ outputs = [
+ "$root_out_dir/obj/lldb/test/Shell/lit-lldb-init-quiet"
+ ]
+ args = [
+ rebase_path(outputs[0]),
+ "command source -C --silent-run true lit-lldb-init"
+ ]
+}
+
# This target should contain all dependencies of check-lldb.
# //:default depends on it, so that ninja's default target builds all
# prerequisites for check-lldb but doesn't run check-lldb itself.
@@ -144,6 +155,7 @@
":lit_shell_site_cfg",
":lit_site_cfg",
":lit_unit_site_cfg",
+ ":lit-lldb-init-quiet",
"//clang/tools/driver:symlinks",
"//lld/tools/lld:symlinks",
"//lldb/tools/driver:lldb",
Index: llvm/utils/gn/build/write_file.py
===================================================================
--- /dev/null
+++ llvm/utils/gn/build/write_file.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python3
+
+"""Write content into file."""
+
+import argparse
+import sys
+
+
+def main():
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument('filepath')
+ parser.add_argument('content')
+
+ args = parser.parse_args()
+
+ with open(args.filepath, 'w') as f:
+ f.write(args.content)
+
+
+if __name__ == '__main__':
+ sys.exit(main())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133604.459526.patch
Type: text/x-patch
Size: 1561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220912/1b1359a6/attachment.bin>
More information about the llvm-commits
mailing list