[PATCH] D55673: [darwin] parse the SDK settings from SDKSettings.json if it exists and pass in the -target-sdk-version to the compiler and backend

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 13 14:15:32 PST 2018


arphaman created this revision.
arphaman added reviewers: steven_wu, ab, dexonsmith.
Herald added subscribers: jkorous, mgorny.

This patch is a follow-up to the LLVM SDK Version metadata support: https://reviews.llvm.org/D55612.

This patch adds support for reading the `SDKSettings.json` file in the Darwin driver. This file is used by the driver to determine the SDK's version, and it uses that information to pass it down to the compiler using the new `-target-sdk-version=`. This option is then used to set the appropriate `SDK Version` module metadata introduced in https://reviews.llvm.org/D55612.


Repository:
  rC Clang

https://reviews.llvm.org/D55673

Files:
  include/clang/Basic/DiagnosticDriverKinds.td
  include/clang/Basic/TargetInfo.h
  include/clang/Basic/TargetOptions.h
  include/clang/Driver/CC1Options.td
  include/clang/Driver/DarwinSDKInfo.h
  lib/CodeGen/ModuleBuilder.cpp
  lib/Driver/CMakeLists.txt
  lib/Driver/DarwinSDKInfo.cpp
  lib/Driver/ToolChains/Darwin.cpp
  lib/Frontend/CompilerInvocation.cpp
  test/CodeGen/darwin-sdk-version.c
  test/Driver/Inputs/MacOSX10.14.sdk/SDKSettings.json
  test/Driver/darwin-sdk-version.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55673.178134.patch
Type: text/x-patch
Size: 11709 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181213/d09e7918/attachment-0001.bin>


More information about the cfe-commits mailing list