From d7ae43438a04bcb651ede50c19042e08514bf729 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 29 Sep 2021 01:24:43 -0700 Subject: [PATCH] [Driver] Check that short triples are supported for Fuchsia {x86_64,aarch64}-unknown-fuchsia and {x86_64,aarch64}-fuchsia should behave identically as targets, update the test to make sure that's the case. Differential Revision: https://reviews.llvm.org/D110687 --- clang/test/Driver/fuchsia.c | 12 ++++++++++++ clang/test/Driver/fuchsia.cpp | 15 +++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/clang/test/Driver/fuchsia.c b/clang/test/Driver/fuchsia.c index b0eb78b..926594d 100644 --- a/clang/test/Driver/fuchsia.c +++ b/clang/test/Driver/fuchsia.c @@ -10,6 +10,18 @@ // RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \ // RUN: --sysroot=%S/platform -fuse-ld=lld 2>&1 \ // RUN: | FileCheck -check-prefixes=CHECK,CHECK-RISCV64 %s +// RUN: %clang %s -### -no-canonical-prefixes --target=x86_64-fuchsia \ +// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \ +// RUN: --sysroot=%S/platform -fuse-ld=lld 2>&1 \ +// RUN: | FileCheck -check-prefixes=CHECK,CHECK-X86_64 %s +// RUN: %clang %s -### -no-canonical-prefixes --target=aarch64-fuchsia \ +// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \ +// RUN: --sysroot=%S/platform -fuse-ld=lld 2>&1 \ +// RUN: | FileCheck -check-prefixes=CHECK,CHECK-AARCH64 %s +// RUN: %clang %s -### -no-canonical-prefixes --target=riscv64-fuchsia \ +// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \ +// RUN: --sysroot=%S/platform -fuse-ld=lld 2>&1 \ +// RUN: | FileCheck -check-prefixes=CHECK,CHECK-RISCV64 %s // CHECK: {{.*}}clang{{.*}}" "-cc1" // CHECK-X86_64: "-triple" "x86_64-unknown-fuchsia" // CHECK-AARCH64: "-triple" "aarch64-unknown-fuchsia" diff --git a/clang/test/Driver/fuchsia.cpp b/clang/test/Driver/fuchsia.cpp index bd4c7eb..7d2e342 100644 --- a/clang/test/Driver/fuchsia.cpp +++ b/clang/test/Driver/fuchsia.cpp @@ -13,6 +13,21 @@ // RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \ // RUN: --sysroot=%S/platform -fuse-ld=lld 2>&1 \ // RUN: | FileCheck -check-prefixes=CHECK,CHECK-RISCV64 %s +// RUN: %clangxx %s -### -no-canonical-prefixes --target=x86_64-fuchsia \ +// RUN: -ccc-install-dir %S/Inputs/basic_fuchsia_tree/bin \ +// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \ +// RUN: --sysroot=%S/platform -fuse-ld=lld 2>&1 \ +// RUN: | FileCheck -check-prefixes=CHECK,CHECK-X86_64 %s +// RUN: %clangxx %s -### -no-canonical-prefixes --target=aarch64-fuchsia \ +// RUN: -ccc-install-dir %S/Inputs/basic_fuchsia_tree/bin \ +// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \ +// RUN: --sysroot=%S/platform -fuse-ld=lld 2>&1 \ +// RUN: | FileCheck -check-prefixes=CHECK,CHECK-AARCH64 %s +// RUN: %clangxx %s -### -no-canonical-prefixes --target=riscv64-fuchsia \ +// RUN: -ccc-install-dir %S/Inputs/basic_fuchsia_tree/bin \ +// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \ +// RUN: --sysroot=%S/platform -fuse-ld=lld 2>&1 \ +// RUN: | FileCheck -check-prefixes=CHECK,CHECK-RISCV64 %s // CHECK: {{.*}}clang{{.*}}" "-cc1" // CHECK-X86_64: "-triple" "x86_64-unknown-fuchsia" // CHECK-AARCH64: "-triple" "aarch64-unknown-fuchsia" -- 2.7.4