[libc] Add special handling for CUDA PTX features
The NVIDIA compilation path requires some special options. This is mostly because compilation is dependent on having a valid CUDA toolchain. We don't actually need the CUDA toolchain to create the exported `libcgpu.a` library because it's pure LLVM-IR. However, for some language features we need the PTX version to be set. This is normally set by checking the CUDA version, but without one installed it will fail to build. We instead choose a minimum set of features on the desired target, inferred from https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#release-notes and the PTX refernece for functions like `nanosleep`. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D148532
Loading
Please sign in to comment