Merge pull request #45012 from linux-on-ibm-z:s390x_compiler_fixes

PiperOrigin-RevId: 343869219
Change-Id: Idc53e16f27a2bdecf95f922529022aa494598409
This commit is contained in:
TensorFlower Gardener 2020-11-23 09:50:32 -08:00
commit 1da597f01d
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 {