steven_wu added a comment. See comments inline.
================ Comment at: include/clang/Driver/DarwinSDKInfo.h:1 +//===--- DarwinSDKInfo.h - SDK Information parser for darwin ----*- C++ -*-===// +// ---------------- Can this just be in Toolchains/Darwin.h? ================ Comment at: include/clang/Driver/DarwinSDKInfo.h:36 +/// SDK has no SDKSettings.json, or a valid \c DarwinSDKInfo otherwise. +Expected<Optional<DarwinSDKInfo>> parseDarwinSDKInfo(llvm::vfs::FileSystem &VFS, + StringRef SDKRootPath); ---------------- Isn't parseSDKSettings enough? And it can just return Optional<VersionTuple>? ================ Comment at: lib/Driver/ToolChains/Darwin.cpp:2053 + return None; + } + return *SDKInfoOrErr; ---------------- We also has this InferredFromSDK when we infer deployment target, which can be used as a fallback method. The result of parsing JSON should be available to InferredFromSDK in deployment target setting. Bonus point is to set "-sdk_version" flag passing to ld64. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55673/new/ https://reviews.llvm.org/D55673 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits