r363390 - AMDGPU: Use AMDGPU toolchain for other OSes
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 14 06:39:57 PDT 2019
Author: arsenm
Date: Fri Jun 14 06:39:57 2019
New Revision: 363390
URL: http://llvm.org/viewvc/llvm-project?rev=363390&view=rev
Log:
AMDGPU: Use AMDGPU toolchain for other OSes
This would need more work to actually support them, but this is less
wrong than the default.
Modified:
cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/test/Driver/amdgpu-toolchain.c
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=363390&r1=363389&r2=363390&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Fri Jun 14 06:39:57 2019
@@ -4617,6 +4617,8 @@ const ToolChain &Driver::getToolChain(co
TC = llvm::make_unique<toolchains::Solaris>(*this, Target, Args);
break;
case llvm::Triple::AMDHSA:
+ case llvm::Triple::AMDPAL:
+ case llvm::Triple::Mesa3D:
TC = llvm::make_unique<toolchains::AMDGPUToolChain>(*this, Target, Args);
break;
case llvm::Triple::Win32:
Modified: cfe/trunk/test/Driver/amdgpu-toolchain.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/amdgpu-toolchain.c?rev=363390&r1=363389&r2=363390&view=diff
==============================================================================
--- cfe/trunk/test/Driver/amdgpu-toolchain.c (original)
+++ cfe/trunk/test/Driver/amdgpu-toolchain.c Fri Jun 14 06:39:57 2019
@@ -1,6 +1,11 @@
// RUN: %clang -### -target amdgcn--amdhsa -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s
+// RUN: %clang -### -g -target amdgcn--amdhsa -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
+// RUN: %clang -### -target amdgcn-amd-amdpal -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s
+// RUN: %clang -### -g -target amdgcn-amd-amdpal -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
+// RUN: %clang -### -target amdgcn-mesa-mesa3d -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s
+// RUN: %clang -### -g -target amdgcn-mesa-mesa3d -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
+
// AS_LINK: clang{{.*}} "-cc1as"
// AS_LINK: ld.lld{{.*}} "-shared"
-// RUN: %clang -### -g -target amdgcn--amdhsa -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
// DWARF_VER: "-dwarf-version=5"
More information about the cfe-commits
mailing list