[libc-commits] [libc] [libc] Add some integration features into newhdrgen (PR #114272)
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Wed Oct 30 12:52:32 PDT 2024
================
@@ -252,30 +273,62 @@ def main():
)
args = parser.parse_args()
+ def write_to_file(path, contents):
+ if (
+ not args.write_if_changed
+ or not path.exists()
+ or path.read_text() != contents
+ ):
+ path.write_text(contents)
+
+ yaml_file = args.yaml_file
+ if args.h_def_file and not yaml_file:
+ libc_include_dir = args.libc_dir / "include"
+ libc_yaml_dir = args.libc_dir / "newhdrgen" / "yaml"
+ yaml_file = libc_yaml_dir / args.h_def_file.with_suffix("").with_suffix(
----------------
michaelrj-google wrote:
How does this suffix stripping handle the `.h.def` file having effectively two suffixes? Does it strip both `.h` and `.def`?
https://github.com/llvm/llvm-project/pull/114272
More information about the libc-commits
mailing list