[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

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 30 10:24:33 PST 2019


tra added a comment.

Would that be OK to use target_sdk_version to pass *CUDA* SDK version to the CC1 compilations?
I have upcoming changes that need to know the version to generate correct glue IR for CUDA. The driver currently figures out detected CUDA version in lib/Driver/ToolChains/Cuda.cpp and I could use -target-sdk-version to pass it on to CC1 instances.

On one hand CUDA is a target SDK and the option appears to be accessible exactly where I need it. On the other hand, my use case is not *exactly* the case `-target-sdk-version` was intended for (i.e. it's not darwin and it has nothing to do with module metadata, though it *may* be eventually useful there even for CUDA).

If using the option for CUDA sounds like too much of a hack, I guess I can add a separate `-cuda-sdk-version=`, though it would effectively replicate some of this patch.

Opinions?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55673/new/

https://reviews.llvm.org/D55673





More information about the cfe-commits mailing list