forked from OSchip/llvm-project
66c4fd7987
Summary: Compiling CUDA device code requires us to know the host toolchain, because CUDA device-side compiles pull in e.g. host headers. When we only supported Linux compilation, this worked because CudaToolChain, which is responsible for device-side CUDA compilation, inherited from the Linux toolchain. But in order to support MacOS, CudaToolChain needs to take a HostToolChain pointer. Because a CUDA toolchain now requires a host TC, we no longer will create a CUDA toolchain from Driver::getToolChain -- you have to go through CreateOffloadingDeviceToolChains. I am *pretty* sure this is correct, and that previously any attempt to create a CUDA toolchain through getToolChain() would eventually have resulted in us throwing "error: unsupported use of NVPTX for host compilation". In any case hacking getToolChain to create a CUDA+host toolchain would be wrong, because a Driver can be reused for multiple compilations, potentially with different host TCs, and getToolChain will cache the result, causing us to potentially use a stale host TC. So that's the main change in this patch. In addition, we have to pull CudaInstallationDetector out of Generic_GCC and into a top-level class. It's now used by the Generic_GCC and MachO toolchains. Reviewers: tra Subscribers: rryan, hfinkel, sfantao Differential Revision: https://reviews.llvm.org/D26774 llvm-svn: 287285 |
||
---|---|---|
.. | ||
B_opt_tree | ||
CUDA/usr/local/cuda | ||
CUDA-macosx/usr/local/cuda | ||
CUDA_80/usr/local/cuda | ||
Windows/ARM/8.1/usr/bin | ||
basic_android_ndk_tree | ||
basic_android_tree | ||
basic_cross_linux_tree/usr | ||
basic_freebsd64_tree | ||
basic_freebsd_tree | ||
basic_linux_libcxx_tree/usr | ||
basic_linux_libcxxv2_tree/usr | ||
basic_linux_libstdcxx_libcxxv2_tree/usr | ||
basic_linux_tree | ||
basic_myriad_tree | ||
basic_netbsd_tree/usr/lib | ||
cl-libs | ||
debian_6_mips64_tree | ||
debian_6_mips_tree | ||
debian_8_sparc64_tree | ||
debian_8_sparc_multilib_tree | ||
debian_multiarch_tree | ||
debian_reduced_mips_tree | ||
fake_install_tree | ||
fedora_18_tree | ||
fedora_21_tree/usr | ||
freescale_ppc64_tree | ||
freescale_ppc_tree | ||
gcc_version_parsing1 | ||
gcc_version_parsing2 | ||
gcc_version_parsing3 | ||
gcc_version_parsing4 | ||
gcc_version_parsing5 | ||
gentoo_linux_gcc_4.6.2_tree/usr | ||
gentoo_linux_gcc_4.6.4_tree/usr | ||
gentoo_linux_gcc_4.9.3_tree/usr | ||
gentoo_linux_gcc_multi_version_tree | ||
hexagon_tree/Tools | ||
mingw_arch_tree/usr | ||
mingw_clang_tree/mingw32 | ||
mingw_mingw_builds_tree/mingw32 | ||
mingw_mingw_org_tree/mingw | ||
mingw_msys2_tree/msys64/mingw32 | ||
mingw_opensuse_tree/usr | ||
mingw_ubuntu_tree/usr | ||
mips_cs_tree | ||
mips_fsf_tree | ||
mips_img_tree | ||
mips_img_v2_tree | ||
mips_mti_linux | ||
mips_mti_tree | ||
module | ||
montavista_i686_tree/usr/lib/gcc/i686-montavista-linux/4.2.0 | ||
multiarch_freebsd64_tree | ||
multilib_32bit_linux_tree | ||
multilib_64bit_linux_tree | ||
multilib_arm_linux_tree/usr/include/arm-linux-gnueabi | ||
multilib_armeb_linux_tree/usr/include/armeb-linux-gnueabi | ||
multilib_armebhf_linux_tree/usr/include/armeb-linux-gnueabihf | ||
multilib_armhf_linux_tree/usr/include/arm-linux-gnueabihf | ||
prefixed_tools_tree | ||
resource_dir | ||
scei-ps4_tree/target | ||
sparc-sun-solaris2.11/usr | ||
suse_10.3_ppc64_tree | ||
ubuntu_11.04_multiarch_tree | ||
ubuntu_12.04_LTS_multiarch_tree | ||
ubuntu_13.04_multiarch_tree | ||
ubuntu_14.04_multiarch_tree | ||
ubuntu_14.04_multiarch_tree2 | ||
x86-64_ubuntu_13.10 | ||
cc1-response.txt | ||
file.ll | ||
file.prof | ||
gen-response.c | ||
header0.h | ||
header1.h | ||
header2.h | ||
header3.h | ||
header4.h | ||
pchfile.cpp | ||
pchfile.h | ||
rewrite-1.map | ||
rewrite-2.map | ||
rewrite.map | ||
wildcard1.c | ||
wildcard2.c |