Add s390x support for compiler related TCs

This commit is contained in:
Simrit-Kaur 2020-11-18 08:34:42 -08:00
parent 402d28705e
commit 4e903f130a
2 changed files with 7 additions and 0 deletions

View File

@ -21,8 +21,13 @@ limitations under the License.
static const char kTargetCpuForHost[] = "ppc";
static const char kTargetTripleForHost[] = "ppc64le-ibm-linux-gnu";
#else
#if defined(__s390x__)
static const char kTargetCpuForHost[] = "s390x";
static const char kTargetTripleForHost[] = "systemz-none-linux-gnu";
#else
static const char kTargetCpuForHost[] = "";
static const char kTargetTripleForHost[] = "x86_64-pc-linux";
#endif
#endif
#endif

View File

@ -73,6 +73,8 @@ int main(int argc, char** argv) {
triple_string = "x86_64-pc-windows-msvc19";
} else if (target_cpu == "ppc") {
triple_string = "ppc64le-ibm-linux-gnu";
} else if (target_cpu == "s390x") {
triple_string = "systemz-none-linux-gnu";
} else if (target_cpu == "local") {
triple_string = llvm::sys::getDefaultTargetTriple();
} else {