[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
Wed Jan 30 10:49:18 PST 2019
arphaman added a comment.
In D55673#1377404 <https://reviews.llvm.org/D55673#1377404>, @tra wrote:
> 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?
I would be ok with reusing that option, as long as it's documented that there is a difference in terms of how it can be used.
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