[llvm] 08d4d7c - [gn build] port a3172df59c32 (check-lldb)
Zequan Wu via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 13 10:53:07 PDT 2022
Author: Zequan Wu
Date: 2022-09-13T10:52:56-07:00
New Revision: 08d4d7cb8dc8ab9f84c3094c9bbff3fee3c922b3
URL: https://github.com/llvm/llvm-project/commit/08d4d7cb8dc8ab9f84c3094c9bbff3fee3c922b3
DIFF: https://github.com/llvm/llvm-project/commit/08d4d7cb8dc8ab9f84c3094c9bbff3fee3c922b3.diff
LOG: [gn build] port a3172df59c32 (check-lldb)
https://reviews.llvm.org/rGa3172df59c32aac48c113eb7d6a1324aaa95c474 breaks
check-lldb gn build.
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D133604
Added:
llvm/utils/gn/build/write_file.py
Modified:
llvm/utils/gn/secondary/lldb/test/BUILD.gn
Removed:
################################################################################
diff --git a/llvm/utils/gn/build/write_file.py b/llvm/utils/gn/build/write_file.py
new file mode 100644
index 0000000000000..96545b8ec1b4c
--- /dev/null
+++ b/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())
diff --git a/llvm/utils/gn/secondary/lldb/test/BUILD.gn b/llvm/utils/gn/secondary/lldb/test/BUILD.gn
index f9b30d7c1b57e..92a2919db24e1 100644
--- a/llvm/utils/gn/secondary/lldb/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/lldb/test/BUILD.gn
@@ -134,12 +134,22 @@ write_lit_cfg("lit_unit_site_cfg") {
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], root_build_dir),
+ "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.
group("test") {
deps = [
":lit-lldb-init",
+ ":lit-lldb-init-quiet",
":lit_api_site_cfg",
":lit_shell_site_cfg",
":lit_site_cfg",
More information about the llvm-commits
mailing list